diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod index 441224926c..dbf94f4113 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -3,11 +3,11 @@ module github.com/flyteorg/boilerplate go 1.17 require ( + github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf github.com/alvaroloes/enumer v1.1.2 github.com/flyteorg/flytestdlib v0.4.16 github.com/golangci/golangci-lint v1.38.0 github.com/pseudomuto/protoc-gen-doc v1.4.1 - github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) require ( @@ -152,7 +152,7 @@ require ( github.com/spf13/viper v1.7.1 // indirect github.com/ssgreg/nlreturn/v2 v2.1.0 // indirect github.com/stretchr/objx v0.3.0 // indirect - github.com/stretchr/testify v1.7.0 // indirect + github.com/stretchr/testify v1.7.1 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect github.com/tetafro/godot v1.4.4 // indirect @@ -191,6 +191,4 @@ require ( mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 // indirect ) -replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 - replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.sum b/flytectl/boilerplate/flyte/golang_support_tools/go.sum index 755f8cf6ef..02895fb574 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.sum @@ -79,6 +79,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf h1:M7A2Tn3R8rVgsoJHHKkmkpiNOItys4GxJj6JytRjdDg= +github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf/go.mod h1:Kya4Y46gyq/3TEyAzeNe5UkCk+W9apy5KbuX+5KnZ6M= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= @@ -194,8 +196,6 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -773,8 +773,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= @@ -1035,7 +1036,6 @@ golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= diff --git a/flytectl/boilerplate/flyte/golang_support_tools/tools.go b/flytectl/boilerplate/flyte/golang_support_tools/tools.go index da7b933302..43de03450c 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytectl/boilerplate/flyte/golang_support_tools/tools.go @@ -4,9 +4,9 @@ package tools import ( + _ "github.com/EngHabu/mockery/cmd/mockery" _ "github.com/alvaroloes/enumer" _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" - _ "github.com/vektra/mockery/cmd/mockery" ) diff --git a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh index f205cb9cd0..003220ea70 100755 --- a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -16,8 +16,8 @@ set -e # List of tools to go get # In the format of ":" or ":" if no cli tools=( - "github.com/vektra/mockery/cmd/mockery" - "github.com/flyteorg/flytestdlib/cli/pflags" + "github.com/EngHabu/mockery/cmd/mockery" + "github.com/flyteorg/flytestdlib/cli/pflags@latest" "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" "github.com/alvaroloes/enumer" "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" diff --git a/flytectl/cmd/config/subcommand/config/config_flags.go b/flytectl/cmd/config/subcommand/config/config_flags.go index f22213b004..21ce498e28 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags.go +++ b/flytectl/cmd/config/subcommand/config/config_flags.go @@ -52,6 +52,5 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.StringVar(&DefaultConfig.Host, fmt.Sprintf("%v%v", prefix, "host"), DefaultConfig.Host, "Endpoint of flyte admin") cmdFlags.BoolVar(&DefaultConfig.Insecure, fmt.Sprintf("%v%v", prefix, "insecure"), DefaultConfig.Insecure, "Enable insecure mode") - cmdFlags.BoolVar(&DefaultConfig.Storage, fmt.Sprintf("%v%v", prefix, "storage"), DefaultConfig.Storage, "Enable storage provider config") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/config/config_flags_test.go b/flytectl/cmd/config/subcommand/config/config_flags_test.go index aaf191eb4e..c7cf208df4 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/config/config_flags_test.go @@ -127,18 +127,4 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_storage", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("storage", testValue) - if vBool, err := cmdFlags.GetBool("storage"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Storage) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) } diff --git a/flytectl/cmd/config/subcommand/config/init_flags.go b/flytectl/cmd/config/subcommand/config/init_flags.go index cb2047dec6..1e14634711 100755 --- a/flytectl/cmd/config/subcommand/config/init_flags.go +++ b/flytectl/cmd/config/subcommand/config/init_flags.go @@ -4,7 +4,6 @@ package config var ( DefaultConfig = &Config{ Insecure: false, - Storage: false, } ) @@ -12,5 +11,4 @@ var ( type Config struct { Host string `json:"host" pflag:",Endpoint of flyte admin"` Insecure bool `json:"insecure" pflag:",Enable insecure mode"` - Storage bool `json:"storage" pflag:",Enable storage provider config"` } diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index 30e506c2f1..6d660583a7 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -8,8 +8,6 @@ import ( "os" "strings" - "github.com/flyteorg/flytestdlib/logger" - "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flytectl/pkg/configutil" @@ -19,7 +17,6 @@ import ( cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flytestdlib/config/viper" "github.com/go-ozzo/ozzo-validation/v4/is" - "github.com/manifoldco/promptui" "github.com/spf13/cobra" ) @@ -58,11 +55,6 @@ Generate Flytectl config with a storage provider: ` ) -var prompt = promptui.Select{ - Label: "Select Storage Provider", - Items: []string{"S3", "GCS"}, -} - var endpointPrefix = [3]string{"dns:///", "http://", "https://"} // CreateConfigCommand will return configuration command @@ -80,10 +72,10 @@ func CreateConfigCommand() *cobra.Command { } func configInitFunc(ctx context.Context, args []string, cmdCtx cmdcore.CommandContext) error { - return initFlytectlConfig(ctx, os.Stdin) + return initFlytectlConfig(os.Stdin) } -func initFlytectlConfig(ctx context.Context, reader io.Reader) error { +func initFlytectlConfig(reader io.Reader) error { if err := util.SetupFlyteDir(); err != nil { return err @@ -93,7 +85,7 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { Host: "dns:///localhost:30081", Insecure: true, } - templateStr := configutil.GetSandboxTemplate() + templateStr := configutil.GetTemplate() if len(initConfig.DefaultConfig.Host) > 0 { trimHost := trimEndpoint(initConfig.DefaultConfig.Host) @@ -102,19 +94,6 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { } templateValues.Host = fmt.Sprintf("dns:///%s", trimHost) templateValues.Insecure = initConfig.DefaultConfig.Insecure - templateStr = configutil.AdminConfigTemplate - if initConfig.DefaultConfig.Storage { - templateStr = configutil.GetAWSCloudTemplate() - _, result, err := prompt.Run() - if err != nil { - return err - } - if strings.ToUpper(result) == "GCS" { - templateStr = configutil.GetGoogleCloudTemplate() - } - } else { - logger.Infof(ctx, "Init flytectl config for remote cluster, Please update your storage config in %s. Learn more about the config here https://docs.flyte.org/projects/flytectl/en/latest/index.html#configure", configutil.ConfigFile) - } } var _err error if _, err := os.Stat(configutil.ConfigFile); os.IsNotExist(err) { diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index da5b0a6f97..19c90a13f4 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -59,15 +59,13 @@ func TestSetupConfigFunc(t *testing.T) { initConfig.DefaultConfig.Host = "" assert.Nil(t, err) - assert.Nil(t, initFlytectlConfig(ctx, yes)) - assert.Nil(t, initFlytectlConfig(ctx, yes)) - assert.Nil(t, initFlytectlConfig(ctx, no)) + assert.Nil(t, initFlytectlConfig(yes)) + assert.Nil(t, initFlytectlConfig(no)) initConfig.DefaultConfig.Host = "flyte.org" - assert.Nil(t, initFlytectlConfig(ctx, no)) + assert.Nil(t, initFlytectlConfig(no)) initConfig.DefaultConfig.Host = "localhost:30081" - assert.Nil(t, initFlytectlConfig(ctx, no)) - initConfig.DefaultConfig.Storage = true - assert.NotNil(t, initFlytectlConfig(ctx, yes)) + assert.Nil(t, initFlytectlConfig(no)) + assert.Nil(t, initFlytectlConfig(yes)) } func TestTrimFunc(t *testing.T) { diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index ceff28febb..4cb13d54e3 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -200,7 +200,7 @@ func startDemo(ctx context.Context, cli docker.Docker, g github.GHRepoService, r Host: "localhost:30081", Insecure: true, } - if err := configutil.SetupConfig(configutil.ConfigFile, configutil.GetDemoTemplate(), templateValues); err != nil { + if err := configutil.SetupConfig(configutil.ConfigFile, configutil.GetTemplate(), templateValues); err != nil { return nil, err } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 9e9013b6f5..af09b1f64d 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -182,7 +182,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService Host: "localhost:30081", Insecure: true, } - if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetSandboxTemplate(), templateValues); err != nil { + if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetTemplate(), templateValues); err != nil { return nil, err } diff --git a/flytectl/cmd/update/interfaces/mocks/updater.go b/flytectl/cmd/update/interfaces/mocks/updater.go index 30935bb156..3b56f35add 100644 --- a/flytectl/cmd/update/interfaces/mocks/updater.go +++ b/flytectl/cmd/update/interfaces/mocks/updater.go @@ -26,13 +26,13 @@ func (_m Updater_UpdateNamedEntity) Return(_a0 error) *Updater_UpdateNamedEntity } func (_m *Updater) OnUpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdcore.CommandContext) *Updater_UpdateNamedEntity { - c := _m.On("UpdateNamedEntity", ctx, name, project, domain, rsType, cmdCtx) - return &Updater_UpdateNamedEntity{Call: c} + c_call := _m.On("UpdateNamedEntity", ctx, name, project, domain, rsType, cmdCtx) + return &Updater_UpdateNamedEntity{Call: c_call} } func (_m *Updater) OnUpdateNamedEntityMatch(matchers ...interface{}) *Updater_UpdateNamedEntity { - c := _m.On("UpdateNamedEntity", matchers...) - return &Updater_UpdateNamedEntity{Call: c} + c_call := _m.On("UpdateNamedEntity", matchers...) + return &Updater_UpdateNamedEntity{Call: c_call} } // UpdateNamedEntity provides a mock function with given fields: ctx, name, project, domain, rsType, cmdCtx diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index cec584ee98..27579c223f 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -19,11 +19,13 @@ To load completion, run the following commands in accordance with the shell you To load completions for each session: - Linux + :: $ flytectl completion bash > /etc/bash_completion.d/flytectl - macOS + :: $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index e78875f917..3a10b2437a 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -72,16 +72,6 @@ The full list of available configurable options can be found by running ``flytec endpoint: dns:///localhost:30081 insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). authType: Pkce # authType: Pkce # if using authentication or just drop this. - storage: - connection: - access-key: minio - auth-type: accesskey - disable-ssl: true - endpoint: http://localhost:30084 - region: my-region-here - secret-key: miniostorage - container: my-s3-bucket - type: minio .. tabbed:: AWS Configuration @@ -92,14 +82,6 @@ The full list of available configurable options can be found by running ``flytec endpoint: dns:/// authType: Pkce # authType: Pkce # if using authentication or just drop this. insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - storage: - type: stow - stow: - kind: s3 - config: - auth_type: iam - region: # Example: us-east-2 - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket .. tabbed:: GCS Configuration @@ -110,15 +92,6 @@ The full list of available configurable options can be found by running ``flytec endpoint: dns:/// authType: Pkce # authType: Pkce # if using authentication or just drop this. insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - storage: - type: stow - stow: - kind: google - config: - json: "" - project_id: # TODO: replace with the GCP project ID - scopes: https://www.googleapis.com/auth/devstorage.read_write - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have access to this bucket .. tabbed:: Others diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go index cedad69146..dc60c3d35f 100644 --- a/flytectl/pkg/configutil/configutil.go +++ b/flytectl/pkg/configutil/configutil.go @@ -16,37 +16,6 @@ const ( logger: show-source: true level: 0` - StorageConfigTemplate = ` -storage: - connection: - access-key: minio - auth-type: accesskey - disable-ssl: true - endpoint: http://localhost:30084 - region: us-east-1 - secret-key: miniostorage - type: minio - container: "my-s3-bucket" - enable-multicontainer: true` - StorageS3ConfigTemplate = ` -storage: - type: stow - stow: - kind: s3 - config: - auth_type: iam - region: # Example: us-east-2 - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket` - StorageGCSConfigTemplate = ` -storage: - type: stow - stow: - kind: google - config: - json: "" - project_id: # TODO: replace with the GCP project ID - scopes: https://www.googleapis.com/auth/devstorage.read_write - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket` ) type ConfigTemplateSpec struct { @@ -60,26 +29,11 @@ var ( Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") ) -// GetSandboxTemplate return sandbox cluster config -func GetSandboxTemplate() string { - return AdminConfigTemplate + StorageConfigTemplate -} - -// GetDemoTemplate return demo cluster config -func GetDemoTemplate() string { +// GetTemplate returns cluster config +func GetTemplate() string { return AdminConfigTemplate } -// GetAWSCloudTemplate return aws Flyte config with storage config -func GetAWSCloudTemplate() string { - return AdminConfigTemplate + StorageS3ConfigTemplate -} - -// GetGoogleCloudTemplate return google Flyte config with storage config -func GetGoogleCloudTemplate() string { - return AdminConfigTemplate + StorageGCSConfigTemplate -} - // SetupConfig download the Flyte sandbox config func SetupConfig(filename, templateStr string, templateSpec ConfigTemplateSpec) error { tmpl := template.New("config") diff --git a/flytectl/pkg/configutil/configutil_test.go b/flytectl/pkg/configutil/configutil_test.go index e79964af18..936e0ea682 100644 --- a/flytectl/pkg/configutil/configutil_test.go +++ b/flytectl/pkg/configutil/configutil_test.go @@ -49,8 +49,5 @@ func TestSetupFlytectlConfig(t *testing.T) { } func TestAwsConfig(t *testing.T) { - assert.Equal(t, AdminConfigTemplate+StorageS3ConfigTemplate, GetAWSCloudTemplate()) - assert.Equal(t, AdminConfigTemplate+StorageGCSConfigTemplate, GetGoogleCloudTemplate()) - assert.Equal(t, AdminConfigTemplate+StorageConfigTemplate, GetSandboxTemplate()) - assert.Equal(t, AdminConfigTemplate, GetDemoTemplate()) + assert.Equal(t, AdminConfigTemplate, GetTemplate()) } diff --git a/flytectl/pkg/docker/mocks/docker.go b/flytectl/pkg/docker/mocks/docker.go index b08cf0d51a..b1f234f97f 100644 --- a/flytectl/pkg/docker/mocks/docker.go +++ b/flytectl/pkg/docker/mocks/docker.go @@ -32,13 +32,13 @@ func (_m Docker_ContainerCreate) Return(_a0 container.ContainerCreateCreatedBody } func (_m *Docker) OnContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) *Docker_ContainerCreate { - c := _m.On("ContainerCreate", ctx, config, hostConfig, networkingConfig, platform, containerName) - return &Docker_ContainerCreate{Call: c} + c_call := _m.On("ContainerCreate", ctx, config, hostConfig, networkingConfig, platform, containerName) + return &Docker_ContainerCreate{Call: c_call} } func (_m *Docker) OnContainerCreateMatch(matchers ...interface{}) *Docker_ContainerCreate { - c := _m.On("ContainerCreate", matchers...) - return &Docker_ContainerCreate{Call: c} + c_call := _m.On("ContainerCreate", matchers...) + return &Docker_ContainerCreate{Call: c_call} } // ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName @@ -71,13 +71,13 @@ func (_m Docker_ContainerExecAttach) Return(_a0 types.HijackedResponse, _a1 erro } func (_m *Docker) OnContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) *Docker_ContainerExecAttach { - c := _m.On("ContainerExecAttach", ctx, execID, config) - return &Docker_ContainerExecAttach{Call: c} + c_call := _m.On("ContainerExecAttach", ctx, execID, config) + return &Docker_ContainerExecAttach{Call: c_call} } func (_m *Docker) OnContainerExecAttachMatch(matchers ...interface{}) *Docker_ContainerExecAttach { - c := _m.On("ContainerExecAttach", matchers...) - return &Docker_ContainerExecAttach{Call: c} + c_call := _m.On("ContainerExecAttach", matchers...) + return &Docker_ContainerExecAttach{Call: c_call} } // ContainerExecAttach provides a mock function with given fields: ctx, execID, config @@ -110,13 +110,13 @@ func (_m Docker_ContainerExecCreate) Return(_a0 types.IDResponse, _a1 error) *Do } func (_m *Docker) OnContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) *Docker_ContainerExecCreate { - c := _m.On("ContainerExecCreate", ctx, _a1, config) - return &Docker_ContainerExecCreate{Call: c} + c_call := _m.On("ContainerExecCreate", ctx, _a1, config) + return &Docker_ContainerExecCreate{Call: c_call} } func (_m *Docker) OnContainerExecCreateMatch(matchers ...interface{}) *Docker_ContainerExecCreate { - c := _m.On("ContainerExecCreate", matchers...) - return &Docker_ContainerExecCreate{Call: c} + c_call := _m.On("ContainerExecCreate", matchers...) + return &Docker_ContainerExecCreate{Call: c_call} } // ContainerExecCreate provides a mock function with given fields: ctx, _a1, config @@ -149,13 +149,13 @@ func (_m Docker_ContainerExecInspect) Return(_a0 types.ContainerExecInspect, _a1 } func (_m *Docker) OnContainerExecInspect(ctx context.Context, execID string) *Docker_ContainerExecInspect { - c := _m.On("ContainerExecInspect", ctx, execID) - return &Docker_ContainerExecInspect{Call: c} + c_call := _m.On("ContainerExecInspect", ctx, execID) + return &Docker_ContainerExecInspect{Call: c_call} } func (_m *Docker) OnContainerExecInspectMatch(matchers ...interface{}) *Docker_ContainerExecInspect { - c := _m.On("ContainerExecInspect", matchers...) - return &Docker_ContainerExecInspect{Call: c} + c_call := _m.On("ContainerExecInspect", matchers...) + return &Docker_ContainerExecInspect{Call: c_call} } // ContainerExecInspect provides a mock function with given fields: ctx, execID @@ -188,13 +188,13 @@ func (_m Docker_ContainerList) Return(_a0 []types.Container, _a1 error) *Docker_ } func (_m *Docker) OnContainerList(ctx context.Context, options types.ContainerListOptions) *Docker_ContainerList { - c := _m.On("ContainerList", ctx, options) - return &Docker_ContainerList{Call: c} + c_call := _m.On("ContainerList", ctx, options) + return &Docker_ContainerList{Call: c_call} } func (_m *Docker) OnContainerListMatch(matchers ...interface{}) *Docker_ContainerList { - c := _m.On("ContainerList", matchers...) - return &Docker_ContainerList{Call: c} + c_call := _m.On("ContainerList", matchers...) + return &Docker_ContainerList{Call: c_call} } // ContainerList provides a mock function with given fields: ctx, options @@ -229,13 +229,13 @@ func (_m Docker_ContainerLogs) Return(_a0 io.ReadCloser, _a1 error) *Docker_Cont } func (_m *Docker) OnContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) *Docker_ContainerLogs { - c := _m.On("ContainerLogs", ctx, _a1, options) - return &Docker_ContainerLogs{Call: c} + c_call := _m.On("ContainerLogs", ctx, _a1, options) + return &Docker_ContainerLogs{Call: c_call} } func (_m *Docker) OnContainerLogsMatch(matchers ...interface{}) *Docker_ContainerLogs { - c := _m.On("ContainerLogs", matchers...) - return &Docker_ContainerLogs{Call: c} + c_call := _m.On("ContainerLogs", matchers...) + return &Docker_ContainerLogs{Call: c_call} } // ContainerLogs provides a mock function with given fields: ctx, _a1, options @@ -270,13 +270,13 @@ func (_m Docker_ContainerRemove) Return(_a0 error) *Docker_ContainerRemove { } func (_m *Docker) OnContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) *Docker_ContainerRemove { - c := _m.On("ContainerRemove", ctx, containerID, options) - return &Docker_ContainerRemove{Call: c} + c_call := _m.On("ContainerRemove", ctx, containerID, options) + return &Docker_ContainerRemove{Call: c_call} } func (_m *Docker) OnContainerRemoveMatch(matchers ...interface{}) *Docker_ContainerRemove { - c := _m.On("ContainerRemove", matchers...) - return &Docker_ContainerRemove{Call: c} + c_call := _m.On("ContainerRemove", matchers...) + return &Docker_ContainerRemove{Call: c_call} } // ContainerRemove provides a mock function with given fields: ctx, containerID, options @@ -302,13 +302,13 @@ func (_m Docker_ContainerStart) Return(_a0 error) *Docker_ContainerStart { } func (_m *Docker) OnContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) *Docker_ContainerStart { - c := _m.On("ContainerStart", ctx, containerID, options) - return &Docker_ContainerStart{Call: c} + c_call := _m.On("ContainerStart", ctx, containerID, options) + return &Docker_ContainerStart{Call: c_call} } func (_m *Docker) OnContainerStartMatch(matchers ...interface{}) *Docker_ContainerStart { - c := _m.On("ContainerStart", matchers...) - return &Docker_ContainerStart{Call: c} + c_call := _m.On("ContainerStart", matchers...) + return &Docker_ContainerStart{Call: c_call} } // ContainerStart provides a mock function with given fields: ctx, containerID, options @@ -334,13 +334,13 @@ func (_m Docker_ContainerWait) Return(_a0 <-chan container.ContainerWaitOKBody, } func (_m *Docker) OnContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) *Docker_ContainerWait { - c := _m.On("ContainerWait", ctx, containerID, condition) - return &Docker_ContainerWait{Call: c} + c_call := _m.On("ContainerWait", ctx, containerID, condition) + return &Docker_ContainerWait{Call: c_call} } func (_m *Docker) OnContainerWaitMatch(matchers ...interface{}) *Docker_ContainerWait { - c := _m.On("ContainerWait", matchers...) - return &Docker_ContainerWait{Call: c} + c_call := _m.On("ContainerWait", matchers...) + return &Docker_ContainerWait{Call: c_call} } // ContainerWait provides a mock function with given fields: ctx, containerID, condition @@ -377,13 +377,13 @@ func (_m Docker_ImageList) Return(_a0 []types.ImageSummary, _a1 error) *Docker_I } func (_m *Docker) OnImageList(ctx context.Context, listOption types.ImageListOptions) *Docker_ImageList { - c := _m.On("ImageList", ctx, listOption) - return &Docker_ImageList{Call: c} + c_call := _m.On("ImageList", ctx, listOption) + return &Docker_ImageList{Call: c_call} } func (_m *Docker) OnImageListMatch(matchers ...interface{}) *Docker_ImageList { - c := _m.On("ImageList", matchers...) - return &Docker_ImageList{Call: c} + c_call := _m.On("ImageList", matchers...) + return &Docker_ImageList{Call: c_call} } // ImageList provides a mock function with given fields: ctx, listOption @@ -418,13 +418,13 @@ func (_m Docker_ImagePull) Return(_a0 io.ReadCloser, _a1 error) *Docker_ImagePul } func (_m *Docker) OnImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) *Docker_ImagePull { - c := _m.On("ImagePull", ctx, refStr, options) - return &Docker_ImagePull{Call: c} + c_call := _m.On("ImagePull", ctx, refStr, options) + return &Docker_ImagePull{Call: c_call} } func (_m *Docker) OnImagePullMatch(matchers ...interface{}) *Docker_ImagePull { - c := _m.On("ImagePull", matchers...) - return &Docker_ImagePull{Call: c} + c_call := _m.On("ImagePull", matchers...) + return &Docker_ImagePull{Call: c_call} } // ImagePull provides a mock function with given fields: ctx, refStr, options diff --git a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go index 2f55293a80..1456f4e3bf 100644 --- a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go @@ -26,13 +26,13 @@ func (_m AdminDeleterExtInterface_AdminServiceClient) Return(_a0 service.AdminSe } func (_m *AdminDeleterExtInterface) OnAdminServiceClient() *AdminDeleterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient") - return &AdminDeleterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient") + return &AdminDeleterExtInterface_AdminServiceClient{Call: c_call} } func (_m *AdminDeleterExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminDeleterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient", matchers...) - return &AdminDeleterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient", matchers...) + return &AdminDeleterExtInterface_AdminServiceClient{Call: c_call} } // AdminServiceClient provides a mock function with given fields: @@ -60,13 +60,13 @@ func (_m AdminDeleterExtInterface_DeleteProjectDomainAttributes) Return(_a0 erro } func (_m *AdminDeleterExtInterface) OnDeleteProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) *AdminDeleterExtInterface_DeleteProjectDomainAttributes { - c := _m.On("DeleteProjectDomainAttributes", ctx, project, domain, rsType) - return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c} + c_call := _m.On("DeleteProjectDomainAttributes", ctx, project, domain, rsType) + return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c_call} } func (_m *AdminDeleterExtInterface) OnDeleteProjectDomainAttributesMatch(matchers ...interface{}) *AdminDeleterExtInterface_DeleteProjectDomainAttributes { - c := _m.On("DeleteProjectDomainAttributes", matchers...) - return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c} + c_call := _m.On("DeleteProjectDomainAttributes", matchers...) + return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c_call} } // DeleteProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, rsType @@ -92,13 +92,13 @@ func (_m AdminDeleterExtInterface_DeleteWorkflowAttributes) Return(_a0 error) *A } func (_m *AdminDeleterExtInterface) OnDeleteWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) *AdminDeleterExtInterface_DeleteWorkflowAttributes { - c := _m.On("DeleteWorkflowAttributes", ctx, project, domain, name, rsType) - return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c} + c_call := _m.On("DeleteWorkflowAttributes", ctx, project, domain, name, rsType) + return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c_call} } func (_m *AdminDeleterExtInterface) OnDeleteWorkflowAttributesMatch(matchers ...interface{}) *AdminDeleterExtInterface_DeleteWorkflowAttributes { - c := _m.On("DeleteWorkflowAttributes", matchers...) - return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c} + c_call := _m.On("DeleteWorkflowAttributes", matchers...) + return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c_call} } // DeleteWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, rsType diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 18906ce863..b1032f05b2 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -28,13 +28,13 @@ func (_m AdminFetcherExtInterface_AdminServiceClient) Return(_a0 service.AdminSe } func (_m *AdminFetcherExtInterface) OnAdminServiceClient() *AdminFetcherExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient") - return &AdminFetcherExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient") + return &AdminFetcherExtInterface_AdminServiceClient{Call: c_call} } func (_m *AdminFetcherExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminFetcherExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient", matchers...) - return &AdminFetcherExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient", matchers...) + return &AdminFetcherExtInterface_AdminServiceClient{Call: c_call} } // AdminServiceClient provides a mock function with given fields: @@ -62,13 +62,13 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfLP) Return(_a0 []*admin.LaunchPla } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfLP { - c := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} + c_call := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLPMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfLP { - c := _m.On("FetchAllVerOfLP", matchers...) - return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} + c_call := _m.On("FetchAllVerOfLP", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c_call} } // FetchAllVerOfLP provides a mock function with given fields: ctx, lpName, project, domain, filter @@ -103,13 +103,13 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfTask) Return(_a0 []*admin.Task, _ } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTask(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfTask { - c := _m.On("FetchAllVerOfTask", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} + c_call := _m.On("FetchAllVerOfTask", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTaskMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfTask { - c := _m.On("FetchAllVerOfTask", matchers...) - return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} + c_call := _m.On("FetchAllVerOfTask", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c_call} } // FetchAllVerOfTask provides a mock function with given fields: ctx, name, project, domain, filter @@ -144,13 +144,13 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfWorkflow) Return(_a0 []*admin.Wor } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { - c := _m.On("FetchAllVerOfWorkflow", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} + c_call := _m.On("FetchAllVerOfWorkflow", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflowMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { - c := _m.On("FetchAllVerOfWorkflow", matchers...) - return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} + c_call := _m.On("FetchAllVerOfWorkflow", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c_call} } // FetchAllVerOfWorkflow provides a mock function with given fields: ctx, name, project, domain, filter @@ -185,13 +185,13 @@ func (_m AdminFetcherExtInterface_FetchAllWorkflows) Return(_a0 []*admin.NamedEn } func (_m *AdminFetcherExtInterface) OnFetchAllWorkflows(ctx context.Context, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllWorkflows { - c := _m.On("FetchAllWorkflows", ctx, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c} + c_call := _m.On("FetchAllWorkflows", ctx, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllWorkflowsMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllWorkflows { - c := _m.On("FetchAllWorkflows", matchers...) - return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c} + c_call := _m.On("FetchAllWorkflows", matchers...) + return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c_call} } // FetchAllWorkflows provides a mock function with given fields: ctx, project, domain, filter @@ -226,13 +226,13 @@ func (_m AdminFetcherExtInterface_FetchExecution) Return(_a0 *admin.Execution, _ } func (_m *AdminFetcherExtInterface) OnFetchExecution(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchExecution { - c := _m.On("FetchExecution", ctx, name, project, domain) - return &AdminFetcherExtInterface_FetchExecution{Call: c} + c_call := _m.On("FetchExecution", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchExecution{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchExecutionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchExecution { - c := _m.On("FetchExecution", matchers...) - return &AdminFetcherExtInterface_FetchExecution{Call: c} + c_call := _m.On("FetchExecution", matchers...) + return &AdminFetcherExtInterface_FetchExecution{Call: c_call} } // FetchExecution provides a mock function with given fields: ctx, name, project, domain @@ -267,13 +267,13 @@ func (_m AdminFetcherExtInterface_FetchLPLatestVersion) Return(_a0 *admin.Launch } func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchLPLatestVersion { - c := _m.On("FetchLPLatestVersion", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} + c_call := _m.On("FetchLPLatestVersion", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchLPLatestVersion { - c := _m.On("FetchLPLatestVersion", matchers...) - return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} + c_call := _m.On("FetchLPLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c_call} } // FetchLPLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter @@ -308,13 +308,13 @@ func (_m AdminFetcherExtInterface_FetchLPVersion) Return(_a0 *admin.LaunchPlan, } func (_m *AdminFetcherExtInterface) OnFetchLPVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchLPVersion { - c := _m.On("FetchLPVersion", ctx, name, version, project, domain) - return &AdminFetcherExtInterface_FetchLPVersion{Call: c} + c_call := _m.On("FetchLPVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchLPVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchLPVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchLPVersion { - c := _m.On("FetchLPVersion", matchers...) - return &AdminFetcherExtInterface_FetchLPVersion{Call: c} + c_call := _m.On("FetchLPVersion", matchers...) + return &AdminFetcherExtInterface_FetchLPVersion{Call: c_call} } // FetchLPVersion provides a mock function with given fields: ctx, name, version, project, domain @@ -349,13 +349,13 @@ func (_m AdminFetcherExtInterface_FetchNodeExecutionData) Return(_a0 *admin.Node } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionData(ctx context.Context, nodeID string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchNodeExecutionData { - c := _m.On("FetchNodeExecutionData", ctx, nodeID, execName, project, domain) - return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c} + c_call := _m.On("FetchNodeExecutionData", ctx, nodeID, execName, project, domain) + return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDataMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchNodeExecutionData { - c := _m.On("FetchNodeExecutionData", matchers...) - return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c} + c_call := _m.On("FetchNodeExecutionData", matchers...) + return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c_call} } // FetchNodeExecutionData provides a mock function with given fields: ctx, nodeID, execName, project, domain @@ -390,13 +390,13 @@ func (_m AdminFetcherExtInterface_FetchNodeExecutionDetails) Return(_a0 *admin.N } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentID string) *AdminFetcherExtInterface_FetchNodeExecutionDetails { - c := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain, uniqueParentID) - return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} + c_call := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain, uniqueParentID) + return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetailsMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchNodeExecutionDetails { - c := _m.On("FetchNodeExecutionDetails", matchers...) - return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} + c_call := _m.On("FetchNodeExecutionDetails", matchers...) + return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c_call} } // FetchNodeExecutionDetails provides a mock function with given fields: ctx, name, project, domain, uniqueParentID @@ -431,13 +431,13 @@ func (_m AdminFetcherExtInterface_FetchProjectDomainAttributes) Return(_a0 *admi } func (_m *AdminFetcherExtInterface) OnFetchProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) *AdminFetcherExtInterface_FetchProjectDomainAttributes { - c := _m.On("FetchProjectDomainAttributes", ctx, project, domain, rsType) - return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c} + c_call := _m.On("FetchProjectDomainAttributes", ctx, project, domain, rsType) + return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchProjectDomainAttributesMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchProjectDomainAttributes { - c := _m.On("FetchProjectDomainAttributes", matchers...) - return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c} + c_call := _m.On("FetchProjectDomainAttributes", matchers...) + return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c_call} } // FetchProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, rsType @@ -472,13 +472,13 @@ func (_m AdminFetcherExtInterface_FetchTaskExecutionsOnNode) Return(_a0 *admin.T } func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNode(ctx context.Context, nodeID string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { - c := _m.On("FetchTaskExecutionsOnNode", ctx, nodeID, execName, project, domain) - return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} + c_call := _m.On("FetchTaskExecutionsOnNode", ctx, nodeID, execName, project, domain) + return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNodeMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { - c := _m.On("FetchTaskExecutionsOnNode", matchers...) - return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} + c_call := _m.On("FetchTaskExecutionsOnNode", matchers...) + return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c_call} } // FetchTaskExecutionsOnNode provides a mock function with given fields: ctx, nodeID, execName, project, domain @@ -513,13 +513,13 @@ func (_m AdminFetcherExtInterface_FetchTaskLatestVersion) Return(_a0 *admin.Task } func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchTaskLatestVersion { - c := _m.On("FetchTaskLatestVersion", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} + c_call := _m.On("FetchTaskLatestVersion", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskLatestVersion { - c := _m.On("FetchTaskLatestVersion", matchers...) - return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} + c_call := _m.On("FetchTaskLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c_call} } // FetchTaskLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter @@ -554,13 +554,13 @@ func (_m AdminFetcherExtInterface_FetchTaskVersion) Return(_a0 *admin.Task, _a1 } func (_m *AdminFetcherExtInterface) OnFetchTaskVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchTaskVersion { - c := _m.On("FetchTaskVersion", ctx, name, version, project, domain) - return &AdminFetcherExtInterface_FetchTaskVersion{Call: c} + c_call := _m.On("FetchTaskVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchTaskVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchTaskVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskVersion { - c := _m.On("FetchTaskVersion", matchers...) - return &AdminFetcherExtInterface_FetchTaskVersion{Call: c} + c_call := _m.On("FetchTaskVersion", matchers...) + return &AdminFetcherExtInterface_FetchTaskVersion{Call: c_call} } // FetchTaskVersion provides a mock function with given fields: ctx, name, version, project, domain @@ -595,13 +595,13 @@ func (_m AdminFetcherExtInterface_FetchWorkflowAttributes) Return(_a0 *admin.Wor } func (_m *AdminFetcherExtInterface) OnFetchWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) *AdminFetcherExtInterface_FetchWorkflowAttributes { - c := _m.On("FetchWorkflowAttributes", ctx, project, domain, name, rsType) - return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c} + c_call := _m.On("FetchWorkflowAttributes", ctx, project, domain, name, rsType) + return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchWorkflowAttributesMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowAttributes { - c := _m.On("FetchWorkflowAttributes", matchers...) - return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c} + c_call := _m.On("FetchWorkflowAttributes", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c_call} } // FetchWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, rsType @@ -636,13 +636,13 @@ func (_m AdminFetcherExtInterface_FetchWorkflowLatestVersion) Return(_a0 *admin. } func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { - c := _m.On("FetchWorkflowLatestVersion", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} + c_call := _m.On("FetchWorkflowLatestVersion", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { - c := _m.On("FetchWorkflowLatestVersion", matchers...) - return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} + c_call := _m.On("FetchWorkflowLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c_call} } // FetchWorkflowLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter @@ -677,13 +677,13 @@ func (_m AdminFetcherExtInterface_FetchWorkflowVersion) Return(_a0 *admin.Workfl } func (_m *AdminFetcherExtInterface) OnFetchWorkflowVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchWorkflowVersion { - c := _m.On("FetchWorkflowVersion", ctx, name, version, project, domain) - return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c} + c_call := _m.On("FetchWorkflowVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchWorkflowVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowVersion { - c := _m.On("FetchWorkflowVersion", matchers...) - return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c} + c_call := _m.On("FetchWorkflowVersion", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c_call} } // FetchWorkflowVersion provides a mock function with given fields: ctx, name, version, project, domain @@ -718,13 +718,13 @@ func (_m AdminFetcherExtInterface_ListExecution) Return(_a0 *admin.ExecutionList } func (_m *AdminFetcherExtInterface) OnListExecution(ctx context.Context, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_ListExecution { - c := _m.On("ListExecution", ctx, project, domain, filter) - return &AdminFetcherExtInterface_ListExecution{Call: c} + c_call := _m.On("ListExecution", ctx, project, domain, filter) + return &AdminFetcherExtInterface_ListExecution{Call: c_call} } func (_m *AdminFetcherExtInterface) OnListExecutionMatch(matchers ...interface{}) *AdminFetcherExtInterface_ListExecution { - c := _m.On("ListExecution", matchers...) - return &AdminFetcherExtInterface_ListExecution{Call: c} + c_call := _m.On("ListExecution", matchers...) + return &AdminFetcherExtInterface_ListExecution{Call: c_call} } // ListExecution provides a mock function with given fields: ctx, project, domain, filter @@ -759,13 +759,13 @@ func (_m AdminFetcherExtInterface_ListProjects) Return(_a0 *admin.Projects, _a1 } func (_m *AdminFetcherExtInterface) OnListProjects(ctx context.Context, filter filters.Filters) *AdminFetcherExtInterface_ListProjects { - c := _m.On("ListProjects", ctx, filter) - return &AdminFetcherExtInterface_ListProjects{Call: c} + c_call := _m.On("ListProjects", ctx, filter) + return &AdminFetcherExtInterface_ListProjects{Call: c_call} } func (_m *AdminFetcherExtInterface) OnListProjectsMatch(matchers ...interface{}) *AdminFetcherExtInterface_ListProjects { - c := _m.On("ListProjects", matchers...) - return &AdminFetcherExtInterface_ListProjects{Call: c} + c_call := _m.On("ListProjects", matchers...) + return &AdminFetcherExtInterface_ListProjects{Call: c_call} } // ListProjects provides a mock function with given fields: ctx, filter diff --git a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go index d944ff5a82..93f8370556 100644 --- a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go @@ -26,13 +26,13 @@ func (_m AdminUpdaterExtInterface_AdminServiceClient) Return(_a0 service.AdminSe } func (_m *AdminUpdaterExtInterface) OnAdminServiceClient() *AdminUpdaterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient") - return &AdminUpdaterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient") + return &AdminUpdaterExtInterface_AdminServiceClient{Call: c_call} } func (_m *AdminUpdaterExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminUpdaterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient", matchers...) - return &AdminUpdaterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient", matchers...) + return &AdminUpdaterExtInterface_AdminServiceClient{Call: c_call} } // AdminServiceClient provides a mock function with given fields: @@ -60,13 +60,13 @@ func (_m AdminUpdaterExtInterface_UpdateProjectDomainAttributes) Return(_a0 erro } func (_m *AdminUpdaterExtInterface) OnUpdateProjectDomainAttributes(ctx context.Context, project string, domain string, matchingAttr *admin.MatchingAttributes) *AdminUpdaterExtInterface_UpdateProjectDomainAttributes { - c := _m.On("UpdateProjectDomainAttributes", ctx, project, domain, matchingAttr) - return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c} + c_call := _m.On("UpdateProjectDomainAttributes", ctx, project, domain, matchingAttr) + return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c_call} } func (_m *AdminUpdaterExtInterface) OnUpdateProjectDomainAttributesMatch(matchers ...interface{}) *AdminUpdaterExtInterface_UpdateProjectDomainAttributes { - c := _m.On("UpdateProjectDomainAttributes", matchers...) - return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c} + c_call := _m.On("UpdateProjectDomainAttributes", matchers...) + return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c_call} } // UpdateProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, matchingAttr @@ -92,13 +92,13 @@ func (_m AdminUpdaterExtInterface_UpdateWorkflowAttributes) Return(_a0 error) *A } func (_m *AdminUpdaterExtInterface) OnUpdateWorkflowAttributes(ctx context.Context, project string, domain string, name string, matchingAttr *admin.MatchingAttributes) *AdminUpdaterExtInterface_UpdateWorkflowAttributes { - c := _m.On("UpdateWorkflowAttributes", ctx, project, domain, name, matchingAttr) - return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c} + c_call := _m.On("UpdateWorkflowAttributes", ctx, project, domain, name, matchingAttr) + return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c_call} } func (_m *AdminUpdaterExtInterface) OnUpdateWorkflowAttributesMatch(matchers ...interface{}) *AdminUpdaterExtInterface_UpdateWorkflowAttributes { - c := _m.On("UpdateWorkflowAttributes", matchers...) - return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c} + c_call := _m.On("UpdateWorkflowAttributes", matchers...) + return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c_call} } // UpdateWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, matchingAttr diff --git a/flytectl/pkg/github/mocks/gh_repo_service.go b/flytectl/pkg/github/mocks/gh_repo_service.go index 04c2bfebc1..fd3f932152 100644 --- a/flytectl/pkg/github/mocks/gh_repo_service.go +++ b/flytectl/pkg/github/mocks/gh_repo_service.go @@ -23,13 +23,13 @@ func (_m GHRepoService_GetCommitSHA1) Return(_a0 string, _a1 *github.Response, _ } func (_m *GHRepoService) OnGetCommitSHA1(ctx context.Context, owner string, repo string, ref string, lastSHA string) *GHRepoService_GetCommitSHA1 { - c := _m.On("GetCommitSHA1", ctx, owner, repo, ref, lastSHA) - return &GHRepoService_GetCommitSHA1{Call: c} + c_call := _m.On("GetCommitSHA1", ctx, owner, repo, ref, lastSHA) + return &GHRepoService_GetCommitSHA1{Call: c_call} } func (_m *GHRepoService) OnGetCommitSHA1Match(matchers ...interface{}) *GHRepoService_GetCommitSHA1 { - c := _m.On("GetCommitSHA1", matchers...) - return &GHRepoService_GetCommitSHA1{Call: c} + c_call := _m.On("GetCommitSHA1", matchers...) + return &GHRepoService_GetCommitSHA1{Call: c_call} } // GetCommitSHA1 provides a mock function with given fields: ctx, owner, repo, ref, lastSHA @@ -71,13 +71,13 @@ func (_m GHRepoService_GetLatestRelease) Return(_a0 *github.RepositoryRelease, _ } func (_m *GHRepoService) OnGetLatestRelease(ctx context.Context, owner string, repo string) *GHRepoService_GetLatestRelease { - c := _m.On("GetLatestRelease", ctx, owner, repo) - return &GHRepoService_GetLatestRelease{Call: c} + c_call := _m.On("GetLatestRelease", ctx, owner, repo) + return &GHRepoService_GetLatestRelease{Call: c_call} } func (_m *GHRepoService) OnGetLatestReleaseMatch(matchers ...interface{}) *GHRepoService_GetLatestRelease { - c := _m.On("GetLatestRelease", matchers...) - return &GHRepoService_GetLatestRelease{Call: c} + c_call := _m.On("GetLatestRelease", matchers...) + return &GHRepoService_GetLatestRelease{Call: c_call} } // GetLatestRelease provides a mock function with given fields: ctx, owner, repo @@ -121,13 +121,13 @@ func (_m GHRepoService_GetReleaseByTag) Return(_a0 *github.RepositoryRelease, _a } func (_m *GHRepoService) OnGetReleaseByTag(ctx context.Context, owner string, repo string, tag string) *GHRepoService_GetReleaseByTag { - c := _m.On("GetReleaseByTag", ctx, owner, repo, tag) - return &GHRepoService_GetReleaseByTag{Call: c} + c_call := _m.On("GetReleaseByTag", ctx, owner, repo, tag) + return &GHRepoService_GetReleaseByTag{Call: c_call} } func (_m *GHRepoService) OnGetReleaseByTagMatch(matchers ...interface{}) *GHRepoService_GetReleaseByTag { - c := _m.On("GetReleaseByTag", matchers...) - return &GHRepoService_GetReleaseByTag{Call: c} + c_call := _m.On("GetReleaseByTag", matchers...) + return &GHRepoService_GetReleaseByTag{Call: c_call} } // GetReleaseByTag provides a mock function with given fields: ctx, owner, repo, tag @@ -171,13 +171,13 @@ func (_m GHRepoService_ListReleases) Return(_a0 []*github.RepositoryRelease, _a1 } func (_m *GHRepoService) OnListReleases(ctx context.Context, owner string, repo string, opts *github.ListOptions) *GHRepoService_ListReleases { - c := _m.On("ListReleases", ctx, owner, repo, opts) - return &GHRepoService_ListReleases{Call: c} + c_call := _m.On("ListReleases", ctx, owner, repo, opts) + return &GHRepoService_ListReleases{Call: c_call} } func (_m *GHRepoService) OnListReleasesMatch(matchers ...interface{}) *GHRepoService_ListReleases { - c := _m.On("ListReleases", matchers...) - return &GHRepoService_ListReleases{Call: c} + c_call := _m.On("ListReleases", matchers...) + return &GHRepoService_ListReleases{Call: c_call} } // ListReleases provides a mock function with given fields: ctx, owner, repo, opts diff --git a/flytectl/pkg/k8s/mocks/context_ops.go b/flytectl/pkg/k8s/mocks/context_ops.go index 11b7003d0f..0d9e82dd38 100644 --- a/flytectl/pkg/k8s/mocks/context_ops.go +++ b/flytectl/pkg/k8s/mocks/context_ops.go @@ -22,13 +22,13 @@ func (_m ContextOps_CopyContext) Return(_a0 error) *ContextOps_CopyContext { } func (_m *ContextOps) OnCopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string) *ContextOps_CopyContext { - c := _m.On("CopyContext", srcConfigAccess, srcCtxName, targetCtxName) - return &ContextOps_CopyContext{Call: c} + c_call := _m.On("CopyContext", srcConfigAccess, srcCtxName, targetCtxName) + return &ContextOps_CopyContext{Call: c_call} } func (_m *ContextOps) OnCopyContextMatch(matchers ...interface{}) *ContextOps_CopyContext { - c := _m.On("CopyContext", matchers...) - return &ContextOps_CopyContext{Call: c} + c_call := _m.On("CopyContext", matchers...) + return &ContextOps_CopyContext{Call: c_call} } // CopyContext provides a mock function with given fields: srcConfigAccess, srcCtxName, targetCtxName @@ -54,13 +54,13 @@ func (_m ContextOps_RemoveContext) Return(_a0 error) *ContextOps_RemoveContext { } func (_m *ContextOps) OnRemoveContext(ctxName string) *ContextOps_RemoveContext { - c := _m.On("RemoveContext", ctxName) - return &ContextOps_RemoveContext{Call: c} + c_call := _m.On("RemoveContext", ctxName) + return &ContextOps_RemoveContext{Call: c_call} } func (_m *ContextOps) OnRemoveContextMatch(matchers ...interface{}) *ContextOps_RemoveContext { - c := _m.On("RemoveContext", matchers...) - return &ContextOps_RemoveContext{Call: c} + c_call := _m.On("RemoveContext", matchers...) + return &ContextOps_RemoveContext{Call: c_call} } // RemoveContext provides a mock function with given fields: ctxName diff --git a/flytectl/pkg/visualize/mocks/graphvizer.go b/flytectl/pkg/visualize/mocks/graphvizer.go index e36204ed77..1b1f8b6e24 100644 --- a/flytectl/pkg/visualize/mocks/graphvizer.go +++ b/flytectl/pkg/visualize/mocks/graphvizer.go @@ -21,13 +21,13 @@ func (_m Graphvizer_AddAttr) Return(_a0 error) *Graphvizer_AddAttr { } func (_m *Graphvizer) OnAddAttr(parentGraph string, field string, value string) *Graphvizer_AddAttr { - c := _m.On("AddAttr", parentGraph, field, value) - return &Graphvizer_AddAttr{Call: c} + c_call := _m.On("AddAttr", parentGraph, field, value) + return &Graphvizer_AddAttr{Call: c_call} } func (_m *Graphvizer) OnAddAttrMatch(matchers ...interface{}) *Graphvizer_AddAttr { - c := _m.On("AddAttr", matchers...) - return &Graphvizer_AddAttr{Call: c} + c_call := _m.On("AddAttr", matchers...) + return &Graphvizer_AddAttr{Call: c_call} } // AddAttr provides a mock function with given fields: parentGraph, field, value @@ -53,13 +53,13 @@ func (_m Graphvizer_AddEdge) Return(_a0 error) *Graphvizer_AddEdge { } func (_m *Graphvizer) OnAddEdge(src string, dst string, directed bool, attrs map[string]string) *Graphvizer_AddEdge { - c := _m.On("AddEdge", src, dst, directed, attrs) - return &Graphvizer_AddEdge{Call: c} + c_call := _m.On("AddEdge", src, dst, directed, attrs) + return &Graphvizer_AddEdge{Call: c_call} } func (_m *Graphvizer) OnAddEdgeMatch(matchers ...interface{}) *Graphvizer_AddEdge { - c := _m.On("AddEdge", matchers...) - return &Graphvizer_AddEdge{Call: c} + c_call := _m.On("AddEdge", matchers...) + return &Graphvizer_AddEdge{Call: c_call} } // AddEdge provides a mock function with given fields: src, dst, directed, attrs @@ -85,13 +85,13 @@ func (_m Graphvizer_AddNode) Return(_a0 error) *Graphvizer_AddNode { } func (_m *Graphvizer) OnAddNode(parentGraph string, name string, attrs map[string]string) *Graphvizer_AddNode { - c := _m.On("AddNode", parentGraph, name, attrs) - return &Graphvizer_AddNode{Call: c} + c_call := _m.On("AddNode", parentGraph, name, attrs) + return &Graphvizer_AddNode{Call: c_call} } func (_m *Graphvizer) OnAddNodeMatch(matchers ...interface{}) *Graphvizer_AddNode { - c := _m.On("AddNode", matchers...) - return &Graphvizer_AddNode{Call: c} + c_call := _m.On("AddNode", matchers...) + return &Graphvizer_AddNode{Call: c_call} } // AddNode provides a mock function with given fields: parentGraph, name, attrs @@ -117,13 +117,13 @@ func (_m Graphvizer_AddSubGraph) Return(_a0 error) *Graphvizer_AddSubGraph { } func (_m *Graphvizer) OnAddSubGraph(parentGraph string, name string, attrs map[string]string) *Graphvizer_AddSubGraph { - c := _m.On("AddSubGraph", parentGraph, name, attrs) - return &Graphvizer_AddSubGraph{Call: c} + c_call := _m.On("AddSubGraph", parentGraph, name, attrs) + return &Graphvizer_AddSubGraph{Call: c_call} } func (_m *Graphvizer) OnAddSubGraphMatch(matchers ...interface{}) *Graphvizer_AddSubGraph { - c := _m.On("AddSubGraph", matchers...) - return &Graphvizer_AddSubGraph{Call: c} + c_call := _m.On("AddSubGraph", matchers...) + return &Graphvizer_AddSubGraph{Call: c_call} } // AddSubGraph provides a mock function with given fields: parentGraph, name, attrs @@ -149,13 +149,13 @@ func (_m Graphvizer_DoesEdgeExist) Return(_a0 bool) *Graphvizer_DoesEdgeExist { } func (_m *Graphvizer) OnDoesEdgeExist(src string, dest string) *Graphvizer_DoesEdgeExist { - c := _m.On("DoesEdgeExist", src, dest) - return &Graphvizer_DoesEdgeExist{Call: c} + c_call := _m.On("DoesEdgeExist", src, dest) + return &Graphvizer_DoesEdgeExist{Call: c_call} } func (_m *Graphvizer) OnDoesEdgeExistMatch(matchers ...interface{}) *Graphvizer_DoesEdgeExist { - c := _m.On("DoesEdgeExist", matchers...) - return &Graphvizer_DoesEdgeExist{Call: c} + c_call := _m.On("DoesEdgeExist", matchers...) + return &Graphvizer_DoesEdgeExist{Call: c_call} } // DoesEdgeExist provides a mock function with given fields: src, dest @@ -181,13 +181,13 @@ func (_m Graphvizer_GetEdge) Return(_a0 *gographviz.Edge) *Graphvizer_GetEdge { } func (_m *Graphvizer) OnGetEdge(src string, dest string) *Graphvizer_GetEdge { - c := _m.On("GetEdge", src, dest) - return &Graphvizer_GetEdge{Call: c} + c_call := _m.On("GetEdge", src, dest) + return &Graphvizer_GetEdge{Call: c_call} } func (_m *Graphvizer) OnGetEdgeMatch(matchers ...interface{}) *Graphvizer_GetEdge { - c := _m.On("GetEdge", matchers...) - return &Graphvizer_GetEdge{Call: c} + c_call := _m.On("GetEdge", matchers...) + return &Graphvizer_GetEdge{Call: c_call} } // GetEdge provides a mock function with given fields: src, dest @@ -215,13 +215,13 @@ func (_m Graphvizer_GetNode) Return(_a0 *gographviz.Node) *Graphvizer_GetNode { } func (_m *Graphvizer) OnGetNode(key string) *Graphvizer_GetNode { - c := _m.On("GetNode", key) - return &Graphvizer_GetNode{Call: c} + c_call := _m.On("GetNode", key) + return &Graphvizer_GetNode{Call: c_call} } func (_m *Graphvizer) OnGetNodeMatch(matchers ...interface{}) *Graphvizer_GetNode { - c := _m.On("GetNode", matchers...) - return &Graphvizer_GetNode{Call: c} + c_call := _m.On("GetNode", matchers...) + return &Graphvizer_GetNode{Call: c_call} } // GetNode provides a mock function with given fields: key @@ -249,13 +249,13 @@ func (_m Graphvizer_SetName) Return(_a0 error) *Graphvizer_SetName { } func (_m *Graphvizer) OnSetName(name string) *Graphvizer_SetName { - c := _m.On("SetName", name) - return &Graphvizer_SetName{Call: c} + c_call := _m.On("SetName", name) + return &Graphvizer_SetName{Call: c_call} } func (_m *Graphvizer) OnSetNameMatch(matchers ...interface{}) *Graphvizer_SetName { - c := _m.On("SetName", matchers...) - return &Graphvizer_SetName{Call: c} + c_call := _m.On("SetName", matchers...) + return &Graphvizer_SetName{Call: c_call} } // SetName provides a mock function with given fields: name