Skip to content

Commit 7033868

Browse files
authored
fix: update quay tests and add a script to update them (#708)
StreamOS 9 and StreamOS 10 tests constantly fail in snyk-docker-plugin. This is because Redhat’s quay.io repo does not store old shas once an image is updated. So every time they update the image, the hardcoded sha values need to be updated To alleviate this, I’ve written a shell script to update the shas and update the test snapshot So if these fail in the future, run: npm run update-quay-tests
1 parent bf534c9 commit 7033868

File tree

5 files changed

+306
-242
lines changed

5 files changed

+306
-242
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"test": "npm run test-jest",
2323
"test-jest": "jest --ci --maxWorkers=3 --logHeapUsage --colors",
2424
"test-jest-windows": "jest --ci --maxWorkers=3 --config test/windows/jest.config.js --logHeapUsage",
25+
"update-quay-tests": "bash update_centos_shas.sh",
2526
"prepare": "npm run build"
2627
},
2728
"engines": {

test/fixtures/centos-shas.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// CentOS Stream SHA digests for quay.io/centos/centos images
2+
// This file is automatically updated by the update_centos_shas.sh script
3+
// Run `npm run update-quay-tests` to fetch the latest SHA digests
4+
5+
export const CENTOS_SHAS = {
6+
stream9:
7+
"sha256:60f831ea21128433798b74d2181375c5da2c04e3397a6e7ad3b9abf47159e550",
8+
stream10:
9+
"sha256:798fbe5c40fba2609fae716f5414af6654df21d2552927e85de6a11d20bbff7d",
10+
} as const;

0 commit comments

Comments
 (0)