|
|
@@ -1351,27 +1351,27 @@ func TestHTTPClientTimeoutOptionParsing(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func TestIconFetchAllowPrivateNetworksOptionParsing(t *testing.T) {
|
|
|
+func TestFetcherAllowPrivateNetworksOptionParsing(t *testing.T) {
|
|
|
configParser := NewConfigParser()
|
|
|
|
|
|
- if configParser.options.IconFetchAllowPrivateNetworks() {
|
|
|
- t.Fatalf("Expected ICON_FETCH_ALLOW_PRIVATE_NETWORKS to be disabled by default")
|
|
|
+ if configParser.options.FetcherAllowPrivateNetworks() {
|
|
|
+ t.Fatalf("Expected FETCHER_ALLOW_PRIVATE_NETWORKS to be disabled by default")
|
|
|
}
|
|
|
|
|
|
- if err := configParser.parseLines([]string{"ICON_FETCH_ALLOW_PRIVATE_NETWORKS=1"}); err != nil {
|
|
|
+ if err := configParser.parseLines([]string{"FETCHER_ALLOW_PRIVATE_NETWORKS=1"}); err != nil {
|
|
|
t.Fatalf("Unexpected error: %v", err)
|
|
|
}
|
|
|
|
|
|
- if !configParser.options.IconFetchAllowPrivateNetworks() {
|
|
|
- t.Fatalf("Expected ICON_FETCH_ALLOW_PRIVATE_NETWORKS to be enabled")
|
|
|
+ if !configParser.options.FetcherAllowPrivateNetworks() {
|
|
|
+ t.Fatalf("Expected FETCHER_ALLOW_PRIVATE_NETWORKS to be enabled")
|
|
|
}
|
|
|
|
|
|
- if err := configParser.parseLines([]string{"ICON_FETCH_ALLOW_PRIVATE_NETWORKS=0"}); err != nil {
|
|
|
+ if err := configParser.parseLines([]string{"FETCHER_ALLOW_PRIVATE_NETWORKS=0"}); err != nil {
|
|
|
t.Fatalf("Unexpected error: %v", err)
|
|
|
}
|
|
|
|
|
|
- if configParser.options.IconFetchAllowPrivateNetworks() {
|
|
|
- t.Fatalf("Expected ICON_FETCH_ALLOW_PRIVATE_NETWORKS to be disabled")
|
|
|
+ if configParser.options.FetcherAllowPrivateNetworks() {
|
|
|
+ t.Fatalf("Expected FETCHER_ALLOW_PRIVATE_NETWORKS to be disabled")
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1442,30 +1442,6 @@ func TestMediaProxyHTTPClientTimeoutOptionParsing(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func TestMediaProxyAllowPrivateNetworksOptionParsing(t *testing.T) {
|
|
|
- configParser := NewConfigParser()
|
|
|
-
|
|
|
- if configParser.options.MediaProxyAllowPrivateNetworks() {
|
|
|
- t.Fatalf("Expected MEDIA_PROXY_ALLOW_PRIVATE_NETWORKS to be disabled by default")
|
|
|
- }
|
|
|
-
|
|
|
- if err := configParser.parseLines([]string{"MEDIA_PROXY_ALLOW_PRIVATE_NETWORKS=1"}); err != nil {
|
|
|
- t.Fatalf("Unexpected error: %v", err)
|
|
|
- }
|
|
|
-
|
|
|
- if !configParser.options.MediaProxyAllowPrivateNetworks() {
|
|
|
- t.Fatalf("Expected MEDIA_PROXY_ALLOW_PRIVATE_NETWORKS to be enabled")
|
|
|
- }
|
|
|
-
|
|
|
- if err := configParser.parseLines([]string{"MEDIA_PROXY_ALLOW_PRIVATE_NETWORKS=0"}); err != nil {
|
|
|
- t.Fatalf("Unexpected error: %v", err)
|
|
|
- }
|
|
|
-
|
|
|
- if configParser.options.MediaProxyAllowPrivateNetworks() {
|
|
|
- t.Fatalf("Expected MEDIA_PROXY_ALLOW_PRIVATE_NETWORKS to be disabled")
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
func TestMediaProxyPrivateKeyOptionParsing(t *testing.T) {
|
|
|
configParser := NewConfigParser()
|
|
|
|