# Modernize dax_metaserv to support pytest

XMLWordPrintable

## Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
1
• Sprint:
DB_S18_02, DB_S18_03, DB_S18_04
• Team:
Data Access and Database

## Description

Support pytest.

## Activity

Hide
Tim Jenness added a comment -

Do the tests in dax_metaserv actually get run? I don't see a tests/SConscript file. I imagine this means that the reason this passes with DM-11514 enabled is that nothing actually happens. I think we should fix this as there clearly needs to be at least a test that imports some code. I will remove this as a blocker to DM-11514 though.

Show
Tim Jenness added a comment - Do the tests in dax_metaserv actually get run? I don't see a tests/SConscript file. I imagine this means that the reason this passes with DM-11514 enabled is that nothing actually happens. I think we should fix this as there clearly needs to be at least a test that imports some code. I will remove this as a blocker to DM-11514 though.
Hide
Fritz Mueller added a comment -

Brian Van Klaveren please estimate story points for this

Show
Fritz Mueller added a comment - Brian Van Klaveren please estimate story points for this
Hide
Vaikunth Thukral added a comment - - edited

Existing tests are testing the wrong things. Rather than porting to pytest, they will be removed and a new issue will be created to make appropriate tests instead.

Show
Vaikunth Thukral added a comment - - edited Existing tests are testing the wrong things. Rather than porting to pytest, they will be removed and a new issue will be created to make appropriate tests instead.
Hide
Vaikunth Thukral added a comment -

Brian is removing these tests under this issue.

Show
Vaikunth Thukral added a comment - Brian is removing these tests under this issue.
Hide
Brian Van Klaveren added a comment -

This is fixed but dax_metaserv is broken on OS X thanks to mariadb client. OS X isn't a target though.

Output from running pytest locally:

 bvan@localhost:dax_metaserv(tickets/DM-7629)$pytest   ======================= test session starts =======================   platform darwin -- Python 3.6.2, pytest-3.2.0, py-1.4.34, pluggy-0.4.0   rootdir: /software/slac/workspace/lsst/dax_metaserv, inifile:   plugins: session2file-0.1.9, forked-0.2, xdist-1.20.1, flake8-0.9.1   collected 4 items       tests/test_schema_to_meta.py ....       ======================= 4 passed in 0.08 seconds ======================= Show Brian Van Klaveren added a comment - This is fixed but dax_metaserv is broken on OS X thanks to mariadb client. OS X isn't a target though. Output from running pytest locally: bvan @localhost :dax_metaserv(tickets/DM- 7629 )$ pytest   ======================= test session starts =======================   platform darwin -- Python 3.6 . 2 , pytest- 3.2 . 0 , py- 1.4 . 34 , pluggy- 0.4 . 0   rootdir: /software/slac/workspace/lsst/dax_metaserv, inifile:   plugins: session2file- 0.1 . 9 , forked- 0.2 , xdist- 1.20 . 1 , flake8- 0.9 . 1   collected 4 items       tests/test_schema_to_meta.py ....       ======================= 4 passed in 0.08 seconds =======================
Hide
Tim Jenness added a comment - - edited

You mean it's broken on macOS Jenkins because DM-13652 was rejected, but works fine on Mac in general.

Show
Tim Jenness added a comment - - edited You mean it's broken on macOS Jenkins because DM-13652 was rejected, but works fine on Mac in general.
Hide
Brian Van Klaveren added a comment -

yep, that exactly

Show
Brian Van Klaveren added a comment - yep, that exactly
Hide
Kenny Lo added a comment -

Thanks Brian, for explaining how stuff works here in regard to metadata ingestion.

Show
Kenny Lo added a comment - Thanks Brian, for explaining how stuff works here in regard to metadata ingestion.

## People

• Assignee:
Brian Van Klaveren
Reporter:
Tim Jenness
Reviewers:
Kenny Lo
Watchers:
Brian Van Klaveren, Fritz Mueller, Kenny Lo, Tim Jenness, Vaikunth Thukral