Skip to content

Commit 761933e

Browse files
committed
test(artifacts): api test with flag ignore
Signed-off-by: Celso Henrique Souza Silva <celsohenrique367@gmail.com>
1 parent e412e4a commit 761933e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/apiv2/python/rest_api/test_v2_0_0_artifact.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,20 @@ def test_remove_all(self):
527527
rjson = r.json()
528528
self.assertEqual(len(rjson), 0)
529529

530+
def test_remove_with_ignore(self):
531+
# Test remove non existent artifacts with ignore
532+
removeparameters: dict[str, str | list[str]] = {
533+
"Artifacts": "fake_artifact",
534+
"ignore": "true",
535+
}
536+
537+
url = self.uri("/artifacts/remove")
538+
r = requests.delete(url, params=removeparameters)
539+
rjson = r.json()
540+
541+
# Assert correct response code
542+
self.assertEqual(r.status_code, 200, r.text)
543+
530544
def test_remove_absent_artifact_fails(self):
531545
ARTIFACT_NAME = "localhost/fake/artifact:latest"
532546
url = self.uri("/artifacts/" + ARTIFACT_NAME)

0 commit comments

Comments
 (0)