Skip to content

Commit

Permalink
Fix interactive mod (#210)
Browse files Browse the repository at this point in the history
* fix

* refactor

* fixing default conf for system tests
  • Loading branch information
jt-dd committed Jun 21, 2024
1 parent dece49a commit 9e4e192
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func AskForConfirmation() (bool, error) {
var response string

_, err := fmt.Scanln(&response)
if err.Error() != "unexpected newline" {
if err != nil && err.Error() != "unexpected newline" {
return false, fmt.Errorf("scanln: %w", 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 @@ -130,7 +130,8 @@ func TestExtractTarGz(t *testing.T) {
if err != nil {
t.Error(err)
}
if err := ExtractTarGz(false, "./testdata/archive.tar.gz", tmpPath, tt.args.maxArchiveSize); (err != nil) != tt.wantErr {
dryRun := false
if err := ExtractTarGz(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
2 changes: 1 addition & 1 deletion test/system/kubehound_dump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ingestor:
region: "" # (i.e.: us-west-2)
temp_dir: "/tmp/kubehound"
archive_name: "archive.tar.gz"
max_archive_size: 1073741824 # 1GB
max_archive_size: 2147483648 # 2GB
api: # GRPC endpoint for the ingestor
endpoint: "127.0.0.1:9000"
insecure: true

0 comments on commit 9e4e192

Please sign in to comment.