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:
Cody Rose
2024-06-14 14:30:18 -04:00
committed by GitHub
parent 2964b3b2d2
commit 15719c2c4f
3 changed files with 13 additions and 8 deletions
@@ -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()
+6 -4
View File
@@ -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"),
+6 -4
View File
@@ -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 {