Skip to content

Commit

Permalink
test(bom createreleases): assure behaviour on diverging source URLs
Browse files Browse the repository at this point in the history
In context of unconditional sourceUrl change introduced by commit
"feat: prevent uploading .git files", assure that existing, valid URLs
are not changed.
  • Loading branch information
gernot-h committed Nov 6, 2024
1 parent 8ba66d7 commit 9eedd65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_bom_create_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,11 @@ def test_update_release_SourceUrl(self) -> None:
item2 = Component(name="")
CycloneDxSupport.update_or_set_ext_ref(
item2, ExternalReferenceType.DISTRIBUTION,
CaPyCliBom.SOURCE_URL_COMMENT, "new_url")
CaPyCliBom.SOURCE_URL_COMMENT, "https://some.new/file.tar.gz")
self.app.update_release(item2, release_data)
captured = self.capsys.readouterr() # type: ignore
assert "differs from BOM URL" in captured.out
assert len(responses.calls) == 0 # assure data in SW360 is not changed

# no existing URL, set new URL
responses.add(
Expand Down

0 comments on commit 9eedd65

Please sign in to comment.