Skip to content

Commit 17c9e09

Browse files
author
igor.grzankowski
committed
Add 'tag.gz' to extension filter for apps
1 parent 7d7e2f2 commit 17c9e09

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

pkg/splunk/enterprise/util.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,9 @@ func isAppExtentionValid(receivedKey string) bool {
11981198
case "tgz":
11991199
return true
12001200

1201+
case "tar.gz":
1202+
return true
1203+
12011204
default:
12021205
return false
12031206
}

pkg/splunk/enterprise/util_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ func TestGetAvailableDiskSpaceShouldFail(t *testing.T) {
11761176
}
11771177

11781178
func TestIsAppExtentionValid(t *testing.T) {
1179-
if !isAppExtentionValid("testapp.spl") || !isAppExtentionValid("testapp.tgz") {
1179+
if !isAppExtentionValid("testapp.spl") || !isAppExtentionValid("testapp.tgz") || !isAppExtentionValid("testapp.tar.gz") {
11801180
t.Errorf("failed to detect valid app extension")
11811181
}
11821182

test/testenv/appframework_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var AppInfo = map[string]map[string]string{
5353
"100mb-app-12": {"V1": "1.0.0", "V2": "1.0.0", "filename": "100mb-app-12.tgz"},
5454
"100mb-app-13": {"V1": "1.0.0", "V2": "1.0.0", "filename": "100mb-app-13.tgz"},
5555
"100mb-app-14": {"V1": "1.0.0", "V2": "1.0.0", "filename": "100mb-app-14.tgz"},
56-
"100mb-app-15": {"V1": "1.0.0", "V2": "1.0.0", "filename": "100mb-app-15.tgz"},
56+
"100mb-app-15": {"V1": "1.0.0", "V2": "1.0.0", "filename": "100mb-app-15.tar.gz"},
5757
}
5858

5959
// AppSourceInfo holds info related to app sources

0 commit comments

Comments
 (0)