Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interactive mod #210

Merged
merged 3 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading