@@ -38,7 +38,7 @@ import (
38
38
"github.com/snyk/code-client-go/scan"
39
39
)
40
40
41
- func TestSmoke_Scan_HTTPS (t * testing.T ) {
41
+ func TestSmoke_Scan_IDE (t * testing.T ) {
42
42
var cloneTargetDir , err = testutil .SetupCustomTestRepo (t , "https://github.com/snyk-labs/nodejs-goof" , "0336589" , "" , "" )
43
43
assert .NoError (t , err )
44
44
@@ -88,7 +88,7 @@ func TestSmoke_Scan_HTTPS(t *testing.T) {
88
88
require .NotNil (t , response .Sarif .Runs [0 ].Results [0 ].Locations [0 ].PhysicalLocation .ArtifactLocation .URI )
89
89
}
90
90
91
- func Test_SmokeScan_HTTPS_CLI (t * testing.T ) {
91
+ func Test_SmokeScan_CLI (t * testing.T ) {
92
92
var cloneTargetDir , err = testutil .SetupCustomTestRepo (t , "https://github.com/snyk-labs/nodejs-goof" , "0336589" , "" , "" )
93
93
assert .NoError (t , err )
94
94
@@ -142,51 +142,6 @@ func Test_SmokeScan_HTTPS_CLI(t *testing.T) {
142
142
require .NotNil (t , response .Sarif .Runs [0 ].Results [0 ].Locations [0 ].PhysicalLocation .ArtifactLocation .URI )
143
143
}
144
144
145
- func TestSmoke_Scan_SSH (t * testing.T ) {
146
- var cloneTargetDir ,
err = testutil .
SetupCustomTestRepo (
t ,
"[email protected] :snyk-labs/nodejs-goof" ,
"0336589" ,
"" ,
"" )
147
- assert .NoError (t , err )
148
-
149
- target , err := scan .NewRepositoryTarget (cloneTargetDir )
150
- assert .NoError (t , err )
151
-
152
- files := sliceToChannel ([]string {filepath .Join (cloneTargetDir , "app.js" ), filepath .Join (cloneTargetDir , "utils.js" )})
153
-
154
- logger := zerolog .New (os .Stdout )
155
- instrumentor := testutil .NewTestInstrumentor ()
156
- errorReporter := testutil .NewTestErrorReporter ()
157
- config := testutil .NewTestConfig ()
158
- httpClient := codeClientHTTP .NewHTTPClient (
159
- func () * http.Client {
160
- client := http.Client {
161
- Timeout : time .Duration (180 ) * time .Second ,
162
- Transport : testutil.TestAuthRoundTripper {http .DefaultTransport },
163
- }
164
- return & client
165
- },
166
- codeClientHTTP .WithRetryCount (3 ),
167
- codeClientHTTP .WithLogger (& logger ),
168
- )
169
- trackerFactory := scan .NewNoopTrackerFactory ()
170
-
171
- codeScanner := codeClient .NewCodeScanner (
172
- config ,
173
- httpClient ,
174
- codeClient .WithTrackerFactory (trackerFactory ),
175
- codeClient .WithInstrumentor (instrumentor ),
176
- codeClient .WithErrorReporter (errorReporter ),
177
- codeClient .WithLogger (& logger ),
178
- )
179
-
180
- // let's have a requestID that does not change
181
- span := instrumentor .StartSpan (context .Background (), "UploadAndAnalyze" )
182
- defer span .Finish ()
183
-
184
- response , bundleHash , scanErr := codeScanner .UploadAndAnalyze (span .Context (), uuid .New ().String (), target , files , map [string ]bool {})
185
- require .NoError (t , scanErr )
186
- require .NotEmpty (t , bundleHash )
187
- require .NotNil (t , response )
188
- }
189
-
190
145
func TestSmoke_Scan_SubFolder (t * testing.T ) {
191
146
currDir , err := os .Getwd ()
192
147
require .NoError (t , err )
0 commit comments