@@ -264,42 +264,6 @@ func TestScanWithDependencies(t *testing.T) {
264264 assert .Assert (t , strings .Contains (output , "vulnerability found" ))
265265}
266266
267- func TestScanWithFailOn (t * testing.T ) {
268- if runtime .GOOS == "windows" || runtime .GOOS == "darwin" {
269- t .Skip ("Can't run on this ci platform (windows containers or no engine installed)" )
270- }
271- _ , cleanFunction := createSnykConfFile (t , os .Getenv ("E2E_TEST_AUTH_TOKEN" ))
272- defer cleanFunction ()
273-
274- cmd , configDir , cleanup := dockerCli .createTestCmd ()
275- defer cleanup ()
276-
277- createScanConfigFile (t , configDir )
278-
279- cmd .Command = dockerCli .Command ("scan" , "--accept-license" , "--fail-on" , "upgradable" , ImageWithVulnerabilities )
280- output := icmd .RunCmd (cmd ).Assert (t , icmd.Expected {ExitCode : 0 }).Combined ()
281- assert .Assert (t , strings .Contains (output , "alpine:3.10.0" )) // beginning of the dependency tree
282- assert .Assert (t , cmp .Regexp ("found .* issues" , output ))
283- }
284-
285- func TestScanWithFailOnBadValue (t * testing.T ) {
286- if runtime .GOOS == "windows" || runtime .GOOS == "darwin" {
287- t .Skip ("Can't run on this ci platform (windows containers or no engine installed)" )
288- }
289- _ , cleanFunction := createSnykConfFile (t , os .Getenv ("E2E_TEST_AUTH_TOKEN" ))
290- defer cleanFunction ()
291-
292- cmd , configDir , cleanup := dockerCli .createTestCmd ()
293- defer cleanup ()
294-
295- createScanConfigFile (t , configDir )
296-
297- cmd .Command = dockerCli .Command ("scan" , "--accept-license" , "--fail-on" , "unsupportedValue" , ImageWithVulnerabilities )
298- icmd .RunCmd (cmd ).Assert (t , icmd.Expected {
299- ExitCode : 1 ,
300- Err : "--fail-on takes only 'all', 'upgradable' or 'patchable' values" })
301- }
302-
303267func TestScanWithSeverity (t * testing.T ) {
304268 if runtime .GOOS == "windows" || runtime .GOOS == "darwin" {
305269 t .Skip ("Can't run on this ci platform (windows containers or no engine installed)" )
0 commit comments