Skip to content

Commit

Permalink
change expected tag after latest tag was unpublished
Browse files Browse the repository at this point in the history
Signed-off-by: Jose R. Gonzalez <[email protected]>
  • Loading branch information
komish committed Jun 30, 2023
1 parent 555c25d commit 4d0282d
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified internal/chartverifier/checks/chart-0.1.0-v3.valid.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion internal/chartverifier/checks/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestTemplate(t *testing.T) {

TestCases := []testCase{
{description: "chart-0.1.0-v3.valid.tgz images ", uri: "chart-0.1.0-v3.valid.tgz", images: []string{
"registry.access.redhat.com/rhscl/postgresql-10-rhel7:latest",
"registry.access.redhat.com/rhscl/postgresql-10-rhel7:1-161",
"snyk/kubernetes-operator", "rhscl/mongodb-36-rhel7:1-65",
"icr.io/cpopen/ibmcloud-object-storage-driver@sha256:fc17bb3e89d00b3eb0f50b3ea83aa75c52e43d8e56cf2e0f17475e934eeeeb5f",
"icr.io/cpopen/ibmcloud-object-storage-plugin@sha256:cf654987c38d048bc9e654f3928e9ce9a2a4fd47ce0283bb5f339c1b99298e6e",
Expand Down
4 changes: 2 additions & 2 deletions internal/chartverifier/checks/psql-service-0.1.7/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ image:
name: postgresql-10-rhel7
repository: "registry.access.redhat.com/rhscl/"
pullPolicy: IfNotPresent
tag: "latest"
tag: "1-161"


podSecurityContext:
Expand All @@ -39,4 +39,4 @@ resources:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
memory: 128Mi
2 changes: 1 addition & 1 deletion internal/chartverifier/pyxis/pyxis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func Test_checkImageInRegistry(t *testing.T) {
{description: "Test turbonomic/zookeeper repository and version found.", imageRef: ImageReference{Repository: "turbonomic/zookeeper", Registries: []string{"registry.connect.redhat.com"}, Tag: "8.1.2", Sha: ""}, message: ""},
{description: "Test cpopen/ibmcloud-object-storage-driver repository and sha found.", imageRef: ImageReference{Repository: "cpopen/ibmcloud-object-storage-driver", Registries: []string{"icr.io"}, Tag: "", Sha: "sha256:fc17bb3e89d00b3eb0f50b3ea83aa75c52e43d8e56cf2e0f17475e934eeeeb5f"}, message: ""},
{description: "Test cpopen/ibmcloud-object-storage-plugin repository and sha found.", imageRef: ImageReference{Repository: "cpopen/ibmcloud-object-storage-plugin", Registries: []string{"icr.io"}, Tag: "", Sha: "sha256:cf654987c38d048bc9e654f3928e9ce9a2a4fd47ce0283bb5f339c1b99298e6e"}, message: ""},
{description: "Test postgresql-10-rhel7 repository and tag found", imageRef: ImageReference{Repository: "rhscl/postgresql-10-rhel7", Registries: []string{"registry.access.redhat.com"}, Tag: "latest", Sha: ""}, message: ""},
{description: "Test postgresql-10-rhel7 repository and tag found", imageRef: ImageReference{Repository: "rhscl/postgresql-10-rhel7", Registries: []string{"registry.access.redhat.com"}, Tag: "1-161", Sha: ""}, message: ""},
{description: "Test cpopen/ibmcloud-object-storage-plugin repository sha found.", imageRef: ImageReference{Repository: "cpopen/ibmcloud-object-storage-plugin", Registries: []string{"icr.io"}, Tag: "", Sha: "sha256:7c00bc76f91d456164f98375cd8932a0ec500c9dca1728368f3c1ccdbfd96e91"}, message: ""},
{description: "Test cpopen/ibmcloud-object-storage-driver repository sha found.", imageRef: ImageReference{Repository: "cpopen/ibmcloud-object-storage-driver", Registries: []string{"icr.io"}, Tag: "", Sha: "sha256:667667c5907d0ad145e8518ca0f8cf013ca778d6738b028d1cd08103b1b64667"}, message: ""},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/chartverifier/reportbuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestUrlPackageDigest(t *testing.T) {
charts["https://github.com/openshift-helm-charts/charts/releases/download/hashicorp-vault-0.13.0/hashicorp-vault-0.13.0.tgz"] = "97e274069d9d3d028903610a3f9fca892b2620f0a334de6215ec5f962328586f"
charts["https://github.com/openshift-helm-charts/charts/releases/download/hashicorp-vault-0.12.0/hashicorp-vault-0.12.0.tgz"] = "b07be2a554ecbe6a6dd48ea763ed568de317d17cf1a19fb11ddb562983286555"
charts["https://github.com/IBM/charts/blob/master/repo/ibm-helm/ibm-object-storage-plugin-2.1.2.tgz?raw=true"] = "06efa1e26f8a7ba93a6e6136650b0624af2558cc44a4588198fca322f9219e32"
charts["checks/chart-0.1.0-v3.valid.tgz?raw=true"] = "577c5bbc52f405da1b494bbf1b8251f8e6fdc316583bb0ee71eb74baed843615"
charts["checks/chart-0.1.0-v3.valid.tgz?raw=true"] = "1978eacf2e65dd71838dddb6e33e584950c11675eddf72d8b9ea6bf65b09b4d5"

for chart, sha := range charts {
assert.Equal(t, sha, GetPackageDigest(chart), fmt.Sprintf("%s digests did not match as expected", chart))
Expand Down

0 comments on commit 4d0282d

Please sign in to comment.