Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31736 closed Bug (fixed)

PostgreSQL InspectDB test fails on Windows.

Reported by: Ahmad A. Hussein Owned by: Ahmad A. Hussein
Component: Testing framework Version: dev
Severity: Normal Keywords: postgresql, inspectdb
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ahmad A. Hussein)

On Windows, inspectdb..tests.InspectDBTransactionalTests.test_foreign_data_wrapper fails with the following error:

The error was: could not open file "/dev/null" for reading: No such file or directory
HINT:  COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.

AssertionError: 'class InspectdbIrisForeignTable(models.Model):' not found in [...]

This is because of the way the test is written as pointed out by Nick Pope. Patch fixes this by generalizing the test to use os.devnull to be OS-agnostic instead of /dev/null always.

Change History (8)

comment:1 by Ahmad A. Hussein, 5 years ago

Description: modified (diff)

comment:2 by Ahmad A. Hussein, 5 years ago

Description: modified (diff)

comment:3 by Ahmad A. Hussein, 5 years ago

Description: modified (diff)

comment:4 by Ahmad A. Hussein, 5 years ago

Summary: PostgreSQL InspectDB tests due to assuming it only runs on LinuxPostgreSQL InspectDB test fails due to assuming it only runs on Linux

comment:5 by Ahmad A. Hussein, 5 years ago

Owner: changed from nobody to Ahmad A. Hussein

comment:6 by Mariusz Felisiak, 5 years ago

Summary: PostgreSQL InspectDB test fails due to assuming it only runs on LinuxPostgreSQL InspectDB test fails on Windows.
Triage Stage: UnreviewedAccepted

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 79883511:

Fixed #31736 -- Fixed InspectDBTransactionalTests.test_foreign_data_wrapper crash on Windows.

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In ac0ff7d:

[3.1.x] Fixed #31736 -- Fixed InspectDBTransactionalTests.test_foreign_data_wrapper crash on Windows.

Backport of 798835112d81b852efaae0e067af389c733cd1b3 from master

Note: See TracTickets for help on using tickets.
Back to Top