Update tests for tag removal
- Remove Tag/TagHistory model tests from unit tests - Update CacheSettings tests to remove allow_public_internet field - Replace tag= with version= in upload_test_file calls - Update test assertions to use versions instead of tags - Remove tests for tag: prefix downloads (now uses version:) - Update dependency tests for version-only schema
This commit is contained in:
@@ -25,7 +25,7 @@ class TestArtifactRetrieval:
|
||||
expected_hash = compute_sha256(content)
|
||||
|
||||
upload_test_file(
|
||||
integration_client, project_name, package_name, content, tag="v1"
|
||||
integration_client, project_name, package_name, content, version="v1"
|
||||
)
|
||||
|
||||
response = integration_client.get(f"/api/v1/artifact/{expected_hash}")
|
||||
@@ -53,7 +53,7 @@ class TestArtifactRetrieval:
|
||||
expected_hash = compute_sha256(content)
|
||||
|
||||
upload_test_file(
|
||||
integration_client, project_name, package_name, content, tag="tagged-v1"
|
||||
integration_client, project_name, package_name, content, version="tagged-v1"
|
||||
)
|
||||
|
||||
response = integration_client.get(f"/api/v1/artifact/{expected_hash}")
|
||||
@@ -82,7 +82,7 @@ class TestArtifactStats:
|
||||
expected_hash = compute_sha256(content)
|
||||
|
||||
upload_test_file(
|
||||
integration_client, project, package, content, tag=f"art-{unique_test_id}"
|
||||
integration_client, project, package, content, version=f"art-{unique_test_id}"
|
||||
)
|
||||
|
||||
response = integration_client.get(f"/api/v1/artifact/{expected_hash}/stats")
|
||||
@@ -136,8 +136,8 @@ class TestArtifactStats:
|
||||
)
|
||||
|
||||
# Upload same content to both projects
|
||||
upload_test_file(integration_client, proj1, "pkg", content, tag="v1")
|
||||
upload_test_file(integration_client, proj2, "pkg", content, tag="v1")
|
||||
upload_test_file(integration_client, proj1, "pkg", content, version="v1")
|
||||
upload_test_file(integration_client, proj2, "pkg", content, version="v1")
|
||||
|
||||
# Check artifact stats
|
||||
response = integration_client.get(f"/api/v1/artifact/{expected_hash}/stats")
|
||||
@@ -315,7 +315,7 @@ class TestOrphanedArtifacts:
|
||||
expected_hash = compute_sha256(content)
|
||||
|
||||
# Upload with tag
|
||||
upload_test_file(integration_client, project, package, content, tag="temp-tag")
|
||||
upload_test_file(integration_client, project, package, content, version="temp-tag")
|
||||
|
||||
# Verify not in orphaned list
|
||||
response = integration_client.get("/api/v1/admin/orphaned-artifacts?limit=1000")
|
||||
@@ -357,7 +357,7 @@ class TestGarbageCollection:
|
||||
expected_hash = compute_sha256(content)
|
||||
|
||||
# Upload and delete tag to create orphan
|
||||
upload_test_file(integration_client, project, package, content, tag="dry-run")
|
||||
upload_test_file(integration_client, project, package, content, version="dry-run")
|
||||
integration_client.delete(f"/api/v1/project/{project}/{package}/tags/dry-run")
|
||||
|
||||
# Verify artifact exists
|
||||
@@ -385,7 +385,7 @@ class TestGarbageCollection:
|
||||
expected_hash = compute_sha256(content)
|
||||
|
||||
# Upload with tag (ref_count=1)
|
||||
upload_test_file(integration_client, project, package, content, tag="keep-this")
|
||||
upload_test_file(integration_client, project, package, content, version="keep-this")
|
||||
|
||||
# Verify artifact exists with ref_count=1
|
||||
response = integration_client.get(f"/api/v1/artifact/{expected_hash}")
|
||||
|
||||
Reference in New Issue
Block a user