Skip to content

Replaced tests for InOnlyConcourseResource that reached out to the internet#42

Merged
gchqdev227 merged 2 commits into
mainfrom
feature/replace-in-only-resource-test
Apr 15, 2026
Merged

Replaced tests for InOnlyConcourseResource that reached out to the internet#42
gchqdev227 merged 2 commits into
mainfrom
feature/replace-in-only-resource-test

Conversation

@gchqdev227

Copy link
Copy Markdown
Member

This PR replaces a test for the InOnlyConcourseResource which involved a mock resource downloading a file from the GCHQ website. This file moved, which prompted a rewrite of the test anyway, but attempting to safely download this file without additional dependencies in a way which worked widely across all dev environments was a little out of scope for this project.

The mock resource now just writes a file to disk, since the tests are only really to check that the correct internal functions have been called by the standard API. I've also added some extra lines to improve coverage for the admittedly trivial) implementations of InOnlyConcourseResource.fetch_new_versions and InOnlyConcourseResource.publish_new_version.

@gchqdev227 gchqdev227 self-assigned this Apr 15, 2026
@gchqdev227 gchqdev227 requested a review from tm91236 April 15, 2026 13:15

@tm91236 tm91236 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small comment, otherwise LGTM.

Comment thread tests/test_additional.py
Comment thread tests/test_additional.py
… the test BUILD_NAME is as we expect in the debugging output
@sonarqubecloud

Copy link
Copy Markdown

@gchqdev227 gchqdev227 merged commit 0bd23a0 into main Apr 15, 2026
10 checks passed
@gchqdev227 gchqdev227 deleted the feature/replace-in-only-resource-test branch April 15, 2026 16:26
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