wip: prepare ataching artifacts - fix the test
This commit is contained in:
parent
bfcdcbb78a
commit
45884d1032
2 changed files with 5 additions and 5 deletions
|
@ -39,7 +39,7 @@ def test_sould_publish_artifacts():
|
||||||
)
|
)
|
||||||
release = devops.mixins[MixinType.RELEASE]
|
release = devops.mixins[MixinType.RELEASE]
|
||||||
sut.publish_artifacts(release)
|
sut.publish_artifacts(release)
|
||||||
assert 2345 == mock.add_asset_to_release_id
|
assert "http://repo.test/api/v1/repos/orga/repo/releases/2345/assets" == mock.add_asset_to_release_api_endpoint
|
||||||
|
|
||||||
def test_sould_throw_exception_if_there_was_an_error_in_publish_artifacts():
|
def test_sould_throw_exception_if_there_was_an_error_in_publish_artifacts():
|
||||||
devops = build_devops(
|
devops = build_devops(
|
||||||
|
|
|
@ -162,15 +162,15 @@ class ArtifactDeploymentApiMock:
|
||||||
self.release = release
|
self.release = release
|
||||||
self.create_forgejo_release_count = 0
|
self.create_forgejo_release_count = 0
|
||||||
self.add_asset_to_release_count = 0
|
self.add_asset_to_release_count = 0
|
||||||
self.add_asset_to_release_id = ""
|
self.add_asset_to_release_api_endpoint = ""
|
||||||
|
|
||||||
def create_forgejo_release(self, target_url: str, tag: str, token: str):
|
def create_forgejo_release(self, api_endpoint: str, tag: str, token: str):
|
||||||
self.create_forgejo_release_count += 1
|
self.create_forgejo_release_count += 1
|
||||||
return self.release
|
return self.release
|
||||||
|
|
||||||
def add_asset_to_release(self, target_url: str, release_id: str, attachment: str, attachment_type: str, token: str):
|
def add_asset_to_release(self, api_endpoint: str, attachment: str, attachment_type: str, token: str):
|
||||||
|
self.add_asset_to_release_api_endpoint = api_endpoint
|
||||||
self.add_asset_to_release_count += 1
|
self.add_asset_to_release_count += 1
|
||||||
self.add_asset_to_release_id = release_id
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def calculate_checksums(self, build_path: str):
|
def calculate_checksums(self, build_path: str):
|
||||||
|
|
Loading…
Reference in a new issue