Skip to content

Add validation tests#63

Merged
MJGaughran merged 12 commits into
mainfrom
add-validation-tests
Jul 9, 2026
Merged

Add validation tests#63
MJGaughran merged 12 commits into
mainfrom
add-validation-tests

Conversation

@MJGaughran

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.80%. Comparing base (5c86a9c) to head (0506350).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   82.53%   85.80%   +3.26%     
==========================================
  Files          27       27              
  Lines         979      979              
==========================================
+ Hits          808      840      +32     
+ Misses        171      139      -32     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread tests/test_default_versions.py
Comment thread tests/test_validate.py Outdated
Comment on lines +96 to +105
def test_validate_test_build(tmp_path: Path, configs: Path) -> None:
# --test-build actually builds the modules into a temporary area and syntax-checks
# the generated shell entrypoints, so exercise it on a valid shell-only config.
run_cli(
"validate",
"--test-build",
"--from-scratch",
tmp_path,
configs / "valid" / "minimal",
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these tests which are supposed to build a valid deployment actually check that the module has been built? This test is only really checking that the command runs without raising any exceptions. It doesn't really validate that a valid module has been built

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is now an explicit check (below this one) that tests the difference between the two flag options. The bash syntax check can only run on a created bash script with the --test-build flag.

The check that "a valid module has been built" is instead part of the golden master tests, but obviously this does not cover the test build.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, agree we dont want to overlap the golden master tests too much, happy with this

The test build happens in a temporary directory, so it isn't easy to
check the files exist directly.
@ptsOSL
ptsOSL self-requested a review July 9, 2026 16:01
@MJGaughran
MJGaughran merged commit cf92113 into main Jul 9, 2026
11 checks passed
@MJGaughran
MJGaughran deleted the add-validation-tests branch July 9, 2026 17:04
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.

2 participants