Inappropriate failure conditions in foreign_data regression test
By chance I noticed that the foreign_data regression test fails if run
in an installation where "bob" is a live user. It appears to be
assuming that half a dozen other fairly common names don't belong to
real users, either. Could we make this a little less fragile? Maybe
call them no_such_user_N. Or for that matter do we really need quite
so many tests of the same error condition?
regards, tom lane
By chance I noticed that the foreign_data regression test fails if run
in an installation where "bob" is a live user. It appears to be
assuming that half a dozen other fairly common names don't belong to
real users, either. Could we make this a little less fragile? Maybe
Attached is a patch that attempts to fix that -- user mappings are now
created for "regress_test_missing_role" instead of "bob" or "baz".
call them no_such_user_N. Or for that matter do we really need quite
so many tests of the same error condition?
The code paths leading to those error conditions are different (or at
least they should be). The initial aim was to get as much test coverage
as possible, but I guess the tests could be simplified if this is turning
out to be a maintenance burden
regards,
Martin
Attachments:
foreign_data_regression.patchtext/x-diff; name=foreign_data_regression.patchDownload+24-24
Martin Pihlak escribi�:
By chance I noticed that the foreign_data regression test fails if run
in an installation where "bob" is a live user. It appears to be
assuming that half a dozen other fairly common names don't belong to
real users, either. Could we make this a little less fragile? MaybeAttached is a patch that attempts to fix that -- user mappings are now
created for "regress_test_missing_role" instead of "bob" or "baz".
Applied, thanks.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support