Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-dd committed Oct 18, 2024
1 parent 1ed1136 commit 28b8c02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/dump/writer/tar_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestTarWriter_Write(t *testing.T) {
writer.Close(ctx)

dryRun := false
err = puller.ExtractTarGz(dryRun, writer.OutputPath(), tmpTarExtractDir, config.DefaultMaxArchiveSize)
err = puller.ExtractTarGz(ctx, dryRun, writer.OutputPath(), tmpTarExtractDir, config.DefaultMaxArchiveSize)
if err != nil {
t.Fatalf("failed to extract tar.gz: %v", err)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/ingestor/puller/puller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func TestCheckSanePath(t *testing.T) {

func TestExtractTarGz(t *testing.T) {
t.Parallel()
ctx := context.Background()
type args struct {
maxArchiveSize int64
}
Expand Down Expand Up @@ -132,7 +133,7 @@ func TestExtractTarGz(t *testing.T) {
t.Error(err)
}
dryRun := false
if err := ExtractTarGz(dryRun, "./testdata/archive.tar.gz", tmpPath, tt.args.maxArchiveSize); (err != nil) != tt.wantErr {
if err := ExtractTarGz(ctx, dryRun, "./testdata/archive.tar.gz", tmpPath, tt.args.maxArchiveSize); (err != nil) != tt.wantErr {
t.Errorf("ExtractTarGz() error = %v, wantErr %v", err, tt.wantErr)
}
for _, file := range tt.expectedFiles {
Expand Down
3 changes: 2 additions & 1 deletion test/system/graph_edge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ type EdgeTestSuite struct {
}

func (suite *EdgeTestSuite) SetupTest() {
gdb, err := graphdb.Factory(context.Background(), config.MustLoadConfig(KubeHoundConfigPath))
ctx := context.Background()
gdb, err := graphdb.Factory(ctx, config.MustLoadConfig(ctx, KubeHoundConfigPath))
suite.Require().NoError(err)
suite.gdb = gdb
suite.client = gdb.Raw().(*gremlingo.DriverRemoteConnection)
Expand Down

0 comments on commit 28b8c02

Please sign in to comment.