Fix tests for tag removal and version behavior
- Fix upload response to return actual version (not requested version) when artifact already has a version in the package - Update ref_count tests to use multiple packages (one version per artifact per package design constraint) - Remove allow_public_internet references from upstream caching tests - Update consistency check test to not assert global system health - Add versions field to artifact schemas - Fix dependencies resolution to handle removed tag constraint
This commit is contained in:
@@ -323,7 +323,13 @@ class TestConsistencyCheck:
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_consistency_check_after_upload(self, integration_client, test_package):
|
||||
"""Test consistency check passes after valid upload."""
|
||||
"""Test consistency check runs successfully after a valid upload.
|
||||
|
||||
Note: We don't assert healthy=True because other tests (especially
|
||||
corruption detection tests) may leave orphaned S3 objects behind.
|
||||
This test validates the consistency check endpoint works and the
|
||||
uploaded artifact is included in the check count.
|
||||
"""
|
||||
project, package = test_package
|
||||
content = b"Consistency check test content"
|
||||
|
||||
@@ -335,9 +341,10 @@ class TestConsistencyCheck:
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
|
||||
# Verify check ran and no issues
|
||||
# Verify check ran - at least 1 artifact was checked
|
||||
assert data["total_artifacts_checked"] >= 1
|
||||
assert data["healthy"] is True
|
||||
# Verify no missing S3 objects (uploaded artifact should exist)
|
||||
assert data["missing_s3_objects"] == 0
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_consistency_check_limit_parameter(self, integration_client):
|
||||
|
||||
Reference in New Issue
Block a user