Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net2cog - Ensure test suite does not fail for unconfigured environments. #107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

owenlittlejohns
Copy link
Member

@owenlittlejohns owenlittlejohns commented Oct 21, 2024

Description

This PR came up from skimming recent regression test failures for a Harmony production deployment. The cell that currently verifies the output for the first test will always try to run, even if there is no configuration information for an environment. In this case, production has no collection information, so none of the tests or verification should run.

This PR just wraps the cell in question with a check that things are configured.

Jira Issue ID

N/A

Local Test Steps

  • Checkout the main branch. Run the net2cog test suite (use instructions below). This will fail with NameError: name 'harmony_client' is not defined.
  • Checkout this branch. Run the net2cog test suite (using same instructions below). This should now pass. Check the test/output/net2cog/Results.ipynb output - it should have print statements outputting that the cells were skipped.
  • (Bonus), run export HARMONY_HOST_URL=https://harmony.uat.earthdata.nasa.gov, then re-run the test suite with ./run_notebooks.sh net2cog. The test suite should also still pass against UAT (but should take longer than the production run, because it's actually running the tests). Check the test/output/net2cog/Results.ipynb output - it should look like the tests were fully executed.
export HARMONY_HOST_URL=https://harmony.earthdata.nasa.gov
export EDL_USER=<your EDL user>
export EDL_PASSWORD=<your EDL password>

cd test
make net2cog-image
./run_notebooks.sh net2cog

PR Acceptance Checklist

  • Acceptance criteria met
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)
  • CHANGELOG updated with the changes for this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant