Skip to content

Commit

Permalink
Merge a34768e into 954f881
Browse files Browse the repository at this point in the history
  • Loading branch information
matthyx committed May 16, 2023
2 parents 954f881 + a34768e commit a2d30d7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions core/services/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,6 @@ func generateScanID(workload domain.ScanCommand) string {
if workload.InstanceID != "" {
return workload.InstanceID
}
if workload.ImageTag != "" && workload.ImageHash != "" {
return workload.ImageTag + workload.ImageHash
}
return uuid.New().String()
}

Expand Down
10 changes: 0 additions & 10 deletions core/services/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,16 +510,6 @@ func Test_generateScanID(t *testing.T) {
args args
want string
}{
{
name: "generate scanID with imageHash",
args: args{
workload: domain.ScanCommand{
ImageTag: "k8s.gcr.io/kube-proxy:v1.24.3",
ImageHash: "sha256:6f9c1c5b5b1b2b3b4b5b6b7b8b9b0b1b2b3b4b5b6b7b8b9b0b1b2b3b4b5b6b7b",
},
},
want: "k8s.gcr.io/kube-proxy:v1.24.3sha256:6f9c1c5b5b1b2b3b4b5b6b7b8b9b0b1b2b3b4b5b6b7b8b9b0b1b2b3b4b5b6b7b",
},
{
name: "generate scanID with instanceID",
args: args{
Expand Down

0 comments on commit a2d30d7

Please sign in to comment.