From 5b7a8ed729c4d9dd3cdbf7fe83e0f6cf7b74dd08 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 9 Oct 2023 12:47:35 -0700 Subject: [PATCH] make -C flyteidl generate Signed-off-by: Eduardo Apolinario --- flyteidl/clients/go/admin/config_flags.go | 1 + flyteidl/clients/go/admin/config_flags_test.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/flyteidl/clients/go/admin/config_flags.go b/flyteidl/clients/go/admin/config_flags.go index 0472413b57..db1305c0b1 100755 --- a/flyteidl/clients/go/admin/config_flags.go +++ b/flyteidl/clients/go/admin/config_flags.go @@ -75,6 +75,7 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "deviceFlowConfig.timeout"), defaultConfig.DeviceFlowConfig.Timeout.String(), "amount of time the device flow should complete or else it will be cancelled.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "deviceFlowConfig.pollInterval"), defaultConfig.DeviceFlowConfig.PollInterval.String(), "amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval'") cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "command"), defaultConfig.Command, "Command for external authentication token generation") + cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "proxyCommand"), defaultConfig.ProxyCommand, "Command for external proxy-authorization token generation") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "defaultServiceConfig"), defaultConfig.DefaultServiceConfig, "") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "httpProxyURL"), defaultConfig.HTTPProxyURL.String(), "OPTIONAL: HTTP Proxy to be used for OAuth requests.") return cmdFlags diff --git a/flyteidl/clients/go/admin/config_flags_test.go b/flyteidl/clients/go/admin/config_flags_test.go index 1fb1e2a214..e815bcb5f3 100755 --- a/flyteidl/clients/go/admin/config_flags_test.go +++ b/flyteidl/clients/go/admin/config_flags_test.go @@ -449,6 +449,20 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_proxyCommand", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := join_Config(defaultConfig.ProxyCommand, ",") + + cmdFlags.Set("proxyCommand", testValue) + if vStringSlice, err := cmdFlags.GetStringSlice("proxyCommand"); err == nil { + testDecodeRaw_Config(t, join_Config(vStringSlice, ","), &actual.ProxyCommand) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_defaultServiceConfig", func(t *testing.T) { t.Run("Override", func(t *testing.T) {