@@ -298,7 +298,7 @@ func testRecord() *DeploymentRecord {
298298func allCounters () []prometheus.Counter {
299299 return []prometheus.Counter {
300300 dtmetrics .PostDeploymentRecordOk ,
301- dtmetrics .PostDeploymentRecordNoAttestation ,
301+ dtmetrics .PostDeploymentRecordUnknownArtifact ,
302302 dtmetrics .PostDeploymentRecordRateLimited ,
303303 dtmetrics .PostDeploymentRecordSoftFail ,
304304 dtmetrics .PostDeploymentRecordHardFail ,
@@ -308,19 +308,19 @@ func allCounters() []prometheus.Counter {
308308
309309func TestPostOne (t * testing.T ) {
310310 tests := []struct {
311- name string
312- record * DeploymentRecord
313- retries int
314- handler http.HandlerFunc
315- wantErr bool
316- errType any // expected error type for errors.As
317- errContain string
318- wantOk float64
319- wantNoAttestation float64
320- wantRateLimited float64
321- wantSoftFail float64
322- wantHardFail float64
323- wantClientError float64
311+ name string
312+ record * DeploymentRecord
313+ retries int
314+ handler http.HandlerFunc
315+ wantErr bool
316+ errType any // expected error type for errors.As
317+ errContain string
318+ wantOk float64
319+ wantUnknownArtifact float64
320+ wantRateLimited float64
321+ wantSoftFail float64
322+ wantHardFail float64
323+ wantClientError float64
324324 }{
325325 {
326326 name : "success on 200" ,
@@ -354,10 +354,10 @@ func TestPostOne(t *testing.T) {
354354 w .WriteHeader (http .StatusNotFound )
355355 _ , _ = w .Write ([]byte (`{"message":"no artifacts found"}` ))
356356 },
357- wantErr : true ,
358- errType : & NoArtifactError {},
359- errContain : "sha256:abc123" ,
360- wantNoAttestation : 1 ,
357+ wantErr : true ,
358+ errType : & NoArtifactError {},
359+ errContain : "sha256:abc123" ,
360+ wantUnknownArtifact : 1 ,
361361 },
362362 {
363363 name : "400 returns ClientError" ,
@@ -555,15 +555,15 @@ func TestPostOne(t *testing.T) {
555555 // Assert all metric deltas
556556 wantDeltas := []float64 {
557557 tt .wantOk ,
558- tt .wantNoAttestation ,
558+ tt .wantUnknownArtifact ,
559559 tt .wantRateLimited ,
560560 tt .wantSoftFail ,
561561 tt .wantHardFail ,
562562 tt .wantClientError ,
563563 }
564564 names := []string {
565565 "PostDeploymentRecordOk" ,
566- "PostDeploymentRecordNoAttestation " ,
566+ "PostDeploymentRecordUnknownArtifact " ,
567567 "PostDeploymentRecordRateLimited" ,
568568 "PostDeploymentRecordSoftFail" ,
569569 "PostDeploymentRecordHardFail" ,
0 commit comments