Fix integration tests (#2970)
The recent engine changes (#2887) broke some integration tests. This PR fixes them. I also fixed an unrelated linter issue.
This commit is contained in:
@@ -25,6 +25,7 @@ func TestMultiPartCredentialProviders(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -61,11 +61,13 @@ func TestFilesystem(t *testing.T) {
|
||||
|
||||
// Run the scan.
|
||||
ctx := context.Background()
|
||||
e, err := Start(ctx,
|
||||
WithDetectors(DefaultDetectors()...),
|
||||
WithVerify(false),
|
||||
)
|
||||
e, err := NewEngine(ctx, &Config{
|
||||
Detectors: DefaultDetectors(),
|
||||
SourceManager: sources.NewManager(),
|
||||
Verify: false,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
e.Start(ctx)
|
||||
err = e.ScanFileSystem(ctx, sources.FilesystemConfig{
|
||||
Paths: []string{rootDir},
|
||||
ExcludePathsFile: filepath.Join(configDir, "exclude"),
|
||||
|
||||
@@ -16,11 +16,13 @@ import (
|
||||
func TestGitLab(t *testing.T) {
|
||||
// Run the scan.
|
||||
ctx := context.Background()
|
||||
e, err := Start(ctx,
|
||||
WithDetectors(DefaultDetectors()...),
|
||||
WithVerify(false),
|
||||
)
|
||||
e, err := NewEngine(ctx, &Config{
|
||||
Detectors: DefaultDetectors(),
|
||||
SourceManager: sources.NewManager(),
|
||||
Verify: false,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
e.Start(ctx)
|
||||
|
||||
secret, err := common.GetTestSecret(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user