@@ -59,9 +59,9 @@ tap.test('constructStaticAnalysisOptions() tests', async (t) => {
5959tap . test ( 'extracted image tag tests' , async ( t ) => {
6060 t . plan ( 6 ) ;
6161
62- const imageWithSha = 'nginx@sha256:1234567890abcdef ' ;
62+ const imageWithSha = 'nginx@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2 ' ;
6363 const imageWithShaResult = scannerImages . getImageParts ( imageWithSha ) ;
64- t . same ( imageWithShaResult . imageTag , '1234567890abcdef ' , 'image sha is returned' ) ;
64+ t . same ( imageWithShaResult . imageTag , 'sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2 ' , 'image sha is returned' ) ;
6565
6666 const imageWithTag = 'nginx:latest' ;
6767 const imageWithTagResult = scannerImages . getImageParts ( imageWithTag ) ;
@@ -88,9 +88,9 @@ tap.test('extracted image name tests', async (t) => {
8888 t . plan ( 5 ) ;
8989
9090 t . same ( scannerImages . getImageParts ( 'nginx:latest' ) . imageName , 'nginx' , 'removed image:tag' ) ;
91- t . same ( scannerImages . getImageParts ( 'nginx:@sha256:1234567890abcdef' ) . imageName , 'nginx' , 'removed malformed image:@sha:hex' ) ;
9291 t . same ( scannerImages . getImageParts ( 'node@sha256:215a9fbef4df2c1ceb7c79481d3cfd94ad8f1f0105bade39f3be907bf386c5e1' ) . imageName , 'node' , 'removed image@sha:hex' ) ;
9392 t . same ( scannerImages . getImageParts ( 'kind-registry:5000/python:rc-buster' ) . imageName , 'kind-registry:5000/python' , 'removed repository/image:tag' ) ;
9493 // Verify support on image names that contain dashes
9594 t . same ( scannerImages . getImageParts ( 'kind-registry:5000/python-27:rc-buster' ) . imageName , 'kind-registry:5000/python-27' , 'removed repository/image:tag' ) ;
95+ t . same ( scannerImages . getImageParts ( 'kind-registry:5000/test/python-27:rc-buster' ) . imageName , 'kind-registry:5000/test/python-27' , 'removed repository/image:tag' ) ;
9696} ) ;
0 commit comments