NOAA-GFDL / fre-cli

Python-based command line interface for FRE (FMS Runtime Environment) to compile and run FMS-based models and post-process their output.
GNU Lesser General Public License v3.0
3 stars 7 forks source link

Update test_fre_cli.py #150

Closed ilaflott closed 1 month ago

ilaflott commented 1 month ago

catalogbuilder's API changed, causing fre catalog builder to throw an error. the tests should catch this but do not currently.

updating with a test that will fail, which should show itself in the pipeline.

ilaflott commented 1 month ago

hooray! we have a test that will catch this now:

https://github.com/NOAA-GFDL/fre-cli/actions/runs/10291762258/job/28484761124

149

ilaflott commented 1 month ago

normally i would say do-not merge because the tests are failing, but this is an exception 🤣. @Ciheim is working on the fix- i just wanted to make sure the test we define fails under the right conditions.

ilaflott commented 1 month ago

This actually was not complete. i should have put it in draft mode, that was my mistake.

This test was designed to catch a current issue (CatalogBuilder CI update), the name of the branch, "test_test_should_fail" indicated it's pipeline should have failed, but in fact, it succeeded. ergo, this code will not catch future errors, yet, and wasn't really ready for merge.

I'm not sure what kind of real review is being given to PRs, but i'd appreciate it if we all had a more careful eye

cwhitlock-NOAA commented 1 month ago

About line 155 on this page sounds like it describes that behavior:

https://github.com/NOAA-GFDL/fre-cli/actions/runs/10291762258/job/28484761124

=========================== short test summary info ============================ FAILED fre/tests/test_fre_cli.py::test_cli_fre_catalog_builder - assert 1 == 0

  • where 1 = <Result AttributeError("module 'catalogbuilder.scripts.gen_intake_gfdl' has no attribute 'main'")>.exit_code ======== 1 failed, 64 passed, 2 skipped, 8 warnings in 85.71s (0:01:25) ======== Error: Process completed with exit code 1.

Is there something else that I should have been looking for?