File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
tests/Microsoft.DotNet.Docker.Tests Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ namespace Microsoft.DotNet.Docker.Tests;
16
16
17
17
public sealed class SyftHelper ( DockerHelper dockerHelper , ITestOutputHelper outputHelper )
18
18
{
19
+ private const string OutputFileName = "syft-output.json" ;
20
+
19
21
private static readonly Lazy < string > s_syftImageTag = new ( ( ) =>
20
22
$ "{ Config . GetVariableValue ( "syft|repo" ) } :{ Config . GetVariableValue ( "syft|tag" ) } "
21
23
) ;
@@ -58,7 +60,7 @@ public JsonNode Scan(
58
60
// Run docker build with --output to write syft.json to the output directory
59
61
_dockerHelper . Build ( dockerfile : dockerfilePath , contextDir : tempDirPath , output : tempDirPath ) ;
60
62
61
- string syftOutputPath = Path . Combine ( tempDirPath , "syft.json" ) ;
63
+ string syftOutputPath = Path . Combine ( tempDirPath , OutputFileName ) ;
62
64
if ( ! File . Exists ( syftOutputPath ) )
63
65
{
64
66
throw new FileNotFoundException ( $ "Expected syft output file was not produced: { syftOutputPath } ") ;
@@ -98,11 +100,10 @@ private static string CreateDockerfileContents(
98
100
IEnumerable < string > excludePaths
99
101
)
100
102
{
101
- const string OutputFileName = "syft.json" ;
102
103
103
104
IEnumerable < string > syftCommand =
104
105
[
105
- "/syft/syft " ,
106
+ "/syft" ,
106
107
"scan" ,
107
108
"/rootfs/" ,
108
109
"--source-name" ,
You can’t perform that action at this time.
0 commit comments