Update daf_butler tests to run without pg_sphere

Description

daf_butler tests that use Postgres currently fail if pg_sphere extension is not installed, need to add protection and skip obscore tests if that is the case. Alternatively we can run obscore tests but configre them to not use pg_sphere plugin.

Checklist

Lucidchart Diagrams

Issue Matrix

hide

Activity

Show:
Jim Bosch
February 9, 2023 at 7:47 PM

Looks good, thanks!

Andy Salnikov
February 9, 2023 at 6:44 PM

, could you check the fix when you have a minute. It's trivial, just a change of the type of the exception being caught. I did not run Jenkins, that piece of code is not executing in Jenkins.

PR: https://github.com/lsst/daf_butler/pull/785

Andy Salnikov
February 9, 2023 at 6:32 PM

There is actually a test already for missing pg_sphere, based on exception raised by "CREATE EXTENSION pg_sphere", the issue is that exception type does not match what is actually raised. I'm checking for OperationalError and the actual exception is NotSupportedError. I think it should be safer to just check for generic DatabaseError.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Reviewers

Jim Bosch

Story Points

RubinTeam

Components

Checklist

Created February 9, 2023 at 4:52 PM
Updated February 9, 2023 at 7:59 PM
Resolved February 9, 2023 at 7:59 PM