fix: real nexus webhook format, atomic dedup, tested live

This commit is contained in:
Marker689
2026-05-09 05:25:58 +03:00
parent d73bb910fe
commit d776d037e7
5 changed files with 158 additions and 83 deletions

View File

@@ -67,14 +67,33 @@ def sample_nexus_webhook():
"action": "CREATED",
"repositoryName": "pypi-proxy",
"asset": {
"name": "requests-2.31.0.tar.gz",
"id": "abc123",
"assetId": "dGVzdA==",
"format": "pypi",
"path": "packages/requests/2.31.0/requests-2.31.0.tar.gz",
"name": "/packages/requests/2.31.0/requests-2.31.0.tar.gz",
"downloadUrl": "http://nexus:8081/repository/pypi-proxy/packages/requests/2.31.0/requests-2.31.0.tar.gz",
},
}
@pytest.fixture
def sample_nexus_component_webhook():
return {
"timestamp": "2026-05-09T12:00:00.000+00:00",
"nodeId": "test-node",
"initiator": "admin",
"action": "CREATED",
"repositoryName": "pypi-proxy",
"component": {
"id": "comp1",
"componentId": "dGVzdDI=",
"format": "pypi",
"name": "requests",
"version": "2.31.0",
},
}
@pytest.fixture
def guarddog_output_clean():
return {