diff --git a/go.mod b/go.mod index eb17cee101..cdb5b83d9f 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/mattn/go-colorable v0.1.4 github.com/mattn/go-isatty v0.0.11 github.com/pkg/errors v0.9.1 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200601141019-df9902c66d0d + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200603093029-edb933d7c8d4 github.com/sergi/go-diff v1.0.0 // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index a100daac42..4fd0ee8b5f 100644 --- a/go.sum +++ b/go.sum @@ -61,6 +61,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200601141019-df9902c66d0d h1:5643F4Bm9aFFz482Zju0EW/oP+XA7j+pRWWL6kVcjkQ= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200601141019-df9902c66d0d/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200603093029-edb933d7c8d4 h1:zJe5/C/RVqDc2GYekjEhFI0e6mrBqotu85LyjBHWhhA= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200603093029-edb933d7c8d4/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= diff --git a/internal/core/testing.go b/internal/core/testing.go index a047033852..32ce0fe2ae 100644 --- a/internal/core/testing.go +++ b/internal/core/testing.go @@ -235,6 +235,11 @@ func createTestClient(t *testing.T, testConfig *TestConfig, httpClient *http.Cli return client } +// DefaultRetryInterval is used across all wait functions in the CLI +// In particular it is very handy to define this RetryInterval at 0 second while running cassette in testing +// because they will be executed without waiting. +var DefaultRetryInterval *time.Duration + // Run a CLI integration test. See TestConfig for configuration option func Test(config *TestConfig) func(t *testing.T) { return func(t *testing.T) { @@ -248,6 +253,11 @@ func Test(config *TestConfig) func(t *testing.T) { return "few seconds ago", nil }) + if !UpdateCassettes { + tmp := 0 * time.Second + DefaultRetryInterval = &tmp + } + ctx := config.Ctx if ctx == nil { ctx = context.Background() diff --git a/internal/namespaces/baremetal/v1/baremetal_cli_test.go b/internal/namespaces/baremetal/v1/baremetal_cli_test.go index 95df0ebaaa..d2ea3cafff 100644 --- a/internal/namespaces/baremetal/v1/baremetal_cli_test.go +++ b/internal/namespaces/baremetal/v1/baremetal_cli_test.go @@ -2,18 +2,11 @@ package baremetal import ( "testing" - "time" "github.com/scaleway/scaleway-cli/internal/core" "github.com/scaleway/scaleway-sdk-go/scw" ) -func init() { - if !core.UpdateCassettes { - defaultRetryInterval = 1 * time.Millisecond - } -} - // // Server // diff --git a/internal/namespaces/baremetal/v1/custom_server.go b/internal/namespaces/baremetal/v1/custom_server.go index b34bbde459..fbee52ddcd 100644 --- a/internal/namespaces/baremetal/v1/custom_server.go +++ b/internal/namespaces/baremetal/v1/custom_server.go @@ -43,9 +43,10 @@ func serverWaitCommand() *core.Command { api := baremetal.NewAPI(core.ExtractClient(ctx)) logger.Debugf("starting to wait for server to reach a stable delivery status") server, err := api.WaitForServer(&baremetal.WaitForServerRequest{ - ServerID: argsI.(*serverWaitRequest).ServerID, - Zone: argsI.(*serverWaitRequest).Zone, - Timeout: serverActionTimeout, + ServerID: argsI.(*serverWaitRequest).ServerID, + Zone: argsI.(*serverWaitRequest).Zone, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) if err != nil { return nil, err @@ -58,9 +59,10 @@ func serverWaitCommand() *core.Command { } logger.Debugf("server reached a stable delivery status. Will now starting to wait for server to reach a stable installation status") server, err = api.WaitForServerInstall(&baremetal.WaitForServerInstallRequest{ - ServerID: argsI.(*serverWaitRequest).ServerID, - Zone: argsI.(*serverWaitRequest).Zone, - Timeout: serverActionTimeout, + ServerID: argsI.(*serverWaitRequest).ServerID, + Zone: argsI.(*serverWaitRequest).Zone, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) if err != nil { return nil, err @@ -97,9 +99,10 @@ func serverStartBuilder(c *core.Command) *core.Command { c.WaitFunc = func(ctx context.Context, argsI, respI interface{}) (interface{}, error) { api := baremetal.NewAPI(core.ExtractClient(ctx)) return api.WaitForServer(&baremetal.WaitForServerRequest{ - Zone: argsI.(*baremetal.StartServerRequest).Zone, - ServerID: respI.(*baremetal.Server).ID, - Timeout: serverActionTimeout, + Zone: argsI.(*baremetal.StartServerRequest).Zone, + ServerID: respI.(*baremetal.Server).ID, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } @@ -111,9 +114,10 @@ func serverStopBuilder(c *core.Command) *core.Command { c.WaitFunc = func(ctx context.Context, argsI, respI interface{}) (interface{}, error) { api := baremetal.NewAPI(core.ExtractClient(ctx)) return api.WaitForServer(&baremetal.WaitForServerRequest{ - Zone: argsI.(*baremetal.StopServerRequest).Zone, - ServerID: respI.(*baremetal.Server).ID, - Timeout: serverActionTimeout, + Zone: argsI.(*baremetal.StopServerRequest).Zone, + ServerID: respI.(*baremetal.Server).ID, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } @@ -127,9 +131,10 @@ func serverRebootBuilder(c *core.Command) *core.Command { c.WaitFunc = func(ctx context.Context, argsI, respI interface{}) (interface{}, error) { api := baremetal.NewAPI(core.ExtractClient(ctx)) return api.WaitForServer(&baremetal.WaitForServerRequest{ - Zone: argsI.(*baremetal.RebootServerRequest).Zone, - ServerID: respI.(*baremetal.Server).ID, - Timeout: serverActionTimeout, + Zone: argsI.(*baremetal.RebootServerRequest).Zone, + ServerID: respI.(*baremetal.Server).ID, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } diff --git a/internal/namespaces/baremetal/v1/custom_server_create.go b/internal/namespaces/baremetal/v1/custom_server_create.go index cd0353adff..78fbe0483e 100644 --- a/internal/namespaces/baremetal/v1/custom_server_create.go +++ b/internal/namespaces/baremetal/v1/custom_server_create.go @@ -111,8 +111,8 @@ func serverCreateBuilder(c *core.Command) *core.Command { return api.WaitForServer(&baremetal.WaitForServerRequest{ Zone: argsI.(*baremetalCreateServerRequestCustom).Zone, ServerID: respI.(*baremetal.Server).ID, - Timeout: serverActionTimeout, - RetryInterval: defaultRetryInterval, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } diff --git a/internal/namespaces/baremetal/v1/custom_server_install.go b/internal/namespaces/baremetal/v1/custom_server_install.go index 5eb1759148..8dc66f10ae 100644 --- a/internal/namespaces/baremetal/v1/custom_server_install.go +++ b/internal/namespaces/baremetal/v1/custom_server_install.go @@ -57,8 +57,8 @@ func serverInstallBuilder(c *core.Command) *core.Command { return api.WaitForServerInstall(&baremetal.WaitForServerInstallRequest{ Zone: argsI.(*baremetalInstallServerRequestCustom).Zone, ServerID: respI.(*baremetal.Server).ID, - Timeout: serverActionTimeout, - RetryInterval: defaultRetryInterval, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } diff --git a/internal/namespaces/baremetal/v1/custom_server_test.go b/internal/namespaces/baremetal/v1/custom_server_test.go index 73b98ea31e..ee37af0d29 100644 --- a/internal/namespaces/baremetal/v1/custom_server_test.go +++ b/internal/namespaces/baremetal/v1/custom_server_test.go @@ -24,8 +24,8 @@ func Test_StartServerErrors(t *testing.T) { server, err := api.WaitForServer(&baremetal.WaitForServerRequest{ ServerID: server.ID, Zone: server.Zone, - Timeout: serverActionTimeout, - RetryInterval: defaultRetryInterval, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) return err }, @@ -51,8 +51,8 @@ func Test_StopServerErrors(t *testing.T) { server, err := api.WaitForServer(&baremetal.WaitForServerRequest{ ServerID: server.ID, Zone: server.Zone, - Timeout: serverActionTimeout, - RetryInterval: defaultRetryInterval, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) return err }, @@ -78,8 +78,8 @@ func Test_RebootServerErrors(t *testing.T) { server, err := api.WaitForServer(&baremetal.WaitForServerRequest{ ServerID: server.ID, Zone: server.Zone, - Timeout: serverActionTimeout, - RetryInterval: defaultRetryInterval, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) return err }, diff --git a/internal/namespaces/instance/v1/custom_image.go b/internal/namespaces/instance/v1/custom_image.go index 1219f82f6c..5a1390cb70 100644 --- a/internal/namespaces/instance/v1/custom_image.go +++ b/internal/namespaces/instance/v1/custom_image.go @@ -232,17 +232,18 @@ func imageWaitCommand() *core.Command { Run: func(ctx context.Context, argsI interface{}) (i interface{}, err error) { api := instance.NewAPI(core.ExtractClient(ctx)) return api.WaitForImage(&instance.WaitForImageRequest{ - Zone: argsI.(*instance.WaitForImageRequest).Zone, - ImageID: argsI.(*instance.WaitForImageRequest).ImageID, - Timeout: imageActionTimeout, + Zone: argsI.(*instance.WaitForImageRequest).Zone, + ImageID: argsI.(*instance.WaitForImageRequest).ImageID, + Timeout: scw.TimeDurationPtr(imageActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) }, ArgSpecs: core.ArgSpecs{ { - Name: "image-id", - Short: `ID of the image.`, - Required: true, + Name: "image-id", + Short: `ID of the image.`, + Required: true, Positional: true, }, core.ZoneArgSpec(), diff --git a/internal/namespaces/instance/v1/custom_server.go b/internal/namespaces/instance/v1/custom_server.go index 52c5247dab..6c3a3e15be 100644 --- a/internal/namespaces/instance/v1/custom_server.go +++ b/internal/namespaces/instance/v1/custom_server.go @@ -572,8 +572,10 @@ Once your image is ready you will be able to create a new server based on this i resp := respI.(*instance.GetImageResponse) api := instance.NewAPI(core.ExtractClient(ctx)) return api.WaitForImage(&instance.WaitForImageRequest{ - ImageID: resp.Image.ID, - Zone: resp.Image.Zone, + ImageID: resp.Image.ID, + Zone: resp.Image.Zone, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) }, ArgSpecs: core.ArgSpecs{ @@ -623,9 +625,10 @@ func serverWaitCommand() *core.Command { func waitForServerFunc() core.WaitFunc { return func(ctx context.Context, argsI, _ interface{}) (interface{}, error) { return instance.NewAPI(core.ExtractClient(ctx)).WaitForServer(&instance.WaitForServerRequest{ - Zone: argsI.(*instanceActionRequest).Zone, - ServerID: argsI.(*instanceActionRequest).ServerID, - Timeout: serverActionTimeout, + Zone: argsI.(*instanceActionRequest).Zone, + ServerID: argsI.(*instanceActionRequest).ServerID, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } } @@ -736,8 +739,10 @@ func serverDeleteCommand() *core.Command { if deleteServerArgs.ForceShutdown { finalStateServer, err := api.WaitForServer(&instance.WaitForServerRequest{ - Zone: deleteServerArgs.Zone, - ServerID: deleteServerArgs.ServerID, + Zone: deleteServerArgs.Zone, + ServerID: deleteServerArgs.ServerID, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) if err != nil { return nil, err @@ -745,9 +750,11 @@ func serverDeleteCommand() *core.Command { if finalStateServer.State != instance.ServerStateStopped { err = api.ServerActionAndWait(&instance.ServerActionAndWaitRequest{ - Zone: deleteServerArgs.Zone, - ServerID: deleteServerArgs.ServerID, - Action: instance.ServerActionPoweroff, + Zone: deleteServerArgs.Zone, + ServerID: deleteServerArgs.ServerID, + Action: instance.ServerActionPoweroff, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) if err != nil { return nil, err diff --git a/internal/namespaces/instance/v1/custom_server_create.go b/internal/namespaces/instance/v1/custom_server_create.go index db239c815a..ba4b908a42 100644 --- a/internal/namespaces/instance/v1/custom_server_create.go +++ b/internal/namespaces/instance/v1/custom_server_create.go @@ -137,9 +137,10 @@ scw instance server create image=ubuntu_focal ip=$ip`, func instanceWaitServerCreateRun() core.WaitFunc { return func(ctx context.Context, argsI, respI interface{}) (interface{}, error) { return instance.NewAPI(core.ExtractClient(ctx)).WaitForServer(&instance.WaitForServerRequest{ - Zone: argsI.(*instanceCreateServerRequest).Zone, - ServerID: respI.(*instance.Server).ID, - Timeout: serverActionTimeout, + Zone: argsI.(*instanceCreateServerRequest).Zone, + ServerID: respI.(*instance.Server).ID, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } } diff --git a/internal/namespaces/instance/v1/custom_snapshot.go b/internal/namespaces/instance/v1/custom_snapshot.go index 9f0f8e4eb6..f4b308b83b 100644 --- a/internal/namespaces/instance/v1/custom_snapshot.go +++ b/internal/namespaces/instance/v1/custom_snapshot.go @@ -7,6 +7,7 @@ import ( "github.com/scaleway/scaleway-cli/internal/core" "github.com/scaleway/scaleway-sdk-go/api/instance/v1" + "github.com/scaleway/scaleway-sdk-go/scw" ) const ( @@ -41,9 +42,10 @@ func snapshotCreateBuilder(c *core.Command) *core.Command { c.WaitFunc = func(ctx context.Context, argsI, respI interface{}) (interface{}, error) { api := instance.NewAPI(core.ExtractClient(ctx)) return api.WaitForSnapshot(&instance.WaitForSnapshotRequest{ - SnapshotID: respI.(*instance.CreateSnapshotResponse).Snapshot.ID, - Zone: argsI.(*customCreateSnapshotRequest).Zone, - Timeout: serverActionTimeout, + SnapshotID: respI.(*instance.CreateSnapshotResponse).Snapshot.ID, + Zone: argsI.(*customCreateSnapshotRequest).Zone, + Timeout: scw.TimeDurationPtr(serverActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) } @@ -86,17 +88,18 @@ func snapshotWaitCommand() *core.Command { Run: func(ctx context.Context, argsI interface{}) (i interface{}, err error) { api := instance.NewAPI(core.ExtractClient(ctx)) return api.WaitForSnapshot(&instance.WaitForSnapshotRequest{ - Zone: argsI.(*instance.WaitForSnapshotRequest).Zone, - SnapshotID: argsI.(*instance.WaitForSnapshotRequest).SnapshotID, - Timeout: snapshotActionTimeout, + Zone: argsI.(*instance.WaitForSnapshotRequest).Zone, + SnapshotID: argsI.(*instance.WaitForSnapshotRequest).SnapshotID, + Timeout: scw.TimeDurationPtr(snapshotActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) }, ArgSpecs: core.ArgSpecs{ { - Name: "snapshot-id", - Short: `ID of the snapshot.`, - Required: true, + Name: "snapshot-id", + Short: `ID of the snapshot.`, + Required: true, Positional: true, }, core.ZoneArgSpec(), diff --git a/internal/namespaces/instance/v1/instance_cli_test.go b/internal/namespaces/instance/v1/instance_cli_test.go index 79e0b92ce3..ee73f08165 100644 --- a/internal/namespaces/instance/v1/instance_cli_test.go +++ b/internal/namespaces/instance/v1/instance_cli_test.go @@ -9,12 +9,6 @@ import ( "github.com/stretchr/testify/require" ) -func init() { - if !core.UpdateCassettes { - instance.RetryInterval = 0 - } -} - // // Server // diff --git a/internal/namespaces/k8s/v1/custom_cluster.go b/internal/namespaces/k8s/v1/custom_cluster.go index 36efb66a34..322ccec830 100644 --- a/internal/namespaces/k8s/v1/custom_cluster.go +++ b/internal/namespaces/k8s/v1/custom_cluster.go @@ -78,9 +78,10 @@ func clusterUpdateBuilder(c *core.Command) *core.Command { func waitForClusterFunc(action int) core.WaitFunc { return func(ctx context.Context, _, respI interface{}) (interface{}, error) { cluster, err := k8s.NewAPI(core.ExtractClient(ctx)).WaitForCluster(&k8s.WaitForClusterRequest{ - Region: respI.(*k8s.Cluster).Region, - ClusterID: respI.(*k8s.Cluster).ID, - Timeout: scw.TimeDurationPtr(clusterActionTimeout), + Region: respI.(*k8s.Cluster).Region, + ClusterID: respI.(*k8s.Cluster).ID, + Timeout: scw.TimeDurationPtr(clusterActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) switch action { case clusterActionCreate: @@ -114,9 +115,10 @@ func k8sClusterWaitCommand() *core.Command { Run: func(ctx context.Context, argsI interface{}) (i interface{}, err error) { api := k8s.NewAPI(core.ExtractClient(ctx)) return api.WaitForCluster(&k8s.WaitForClusterRequest{ - Region: argsI.(*k8s.WaitForClusterRequest).Region, - ClusterID: argsI.(*k8s.WaitForClusterRequest).ClusterID, - Timeout: scw.TimeDurationPtr(clusterActionTimeout), + Region: argsI.(*k8s.WaitForClusterRequest).Region, + ClusterID: argsI.(*k8s.WaitForClusterRequest).ClusterID, + Timeout: scw.TimeDurationPtr(clusterActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) }, ArgSpecs: core.ArgSpecs{ diff --git a/internal/namespaces/k8s/v1/custom_node.go b/internal/namespaces/k8s/v1/custom_node.go index 11eb2f9fa0..952a7287a1 100644 --- a/internal/namespaces/k8s/v1/custom_node.go +++ b/internal/namespaces/k8s/v1/custom_node.go @@ -40,9 +40,10 @@ func nodeRebootBuilder(c *core.Command) *core.Command { func waitForNodeFunc(action int) core.WaitFunc { return func(ctx context.Context, _, respI interface{}) (interface{}, error) { node, err := k8s.NewAPI(core.ExtractClient(ctx)).WaitForNode(&k8s.WaitForNodeRequest{ - Region: respI.(*k8s.Node).Region, - NodeID: respI.(*k8s.Node).ID, - Timeout: scw.TimeDurationPtr(nodeActionTimeout), + Region: respI.(*k8s.Node).Region, + NodeID: respI.(*k8s.Node).ID, + Timeout: scw.TimeDurationPtr(nodeActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) switch action { case nodeActionReboot: @@ -63,9 +64,10 @@ func k8sNodeWaitCommand() *core.Command { Run: func(ctx context.Context, argsI interface{}) (i interface{}, err error) { api := k8s.NewAPI(core.ExtractClient(ctx)) return api.WaitForNode(&k8s.WaitForNodeRequest{ - Region: argsI.(*k8s.WaitForNodeRequest).Region, - NodeID: argsI.(*k8s.WaitForNodeRequest).NodeID, - Timeout: scw.TimeDurationPtr(nodeActionTimeout), + Region: argsI.(*k8s.WaitForNodeRequest).Region, + NodeID: argsI.(*k8s.WaitForNodeRequest).NodeID, + Timeout: scw.TimeDurationPtr(nodeActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) }, ArgSpecs: core.ArgSpecs{ diff --git a/internal/namespaces/k8s/v1/custom_pool.go b/internal/namespaces/k8s/v1/custom_pool.go index 1eb9161e17..ee581068bc 100644 --- a/internal/namespaces/k8s/v1/custom_pool.go +++ b/internal/namespaces/k8s/v1/custom_pool.go @@ -64,9 +64,10 @@ func poolUpdateBuilder(c *core.Command) *core.Command { func waitForPoolFunc(action int) core.WaitFunc { return func(ctx context.Context, _, respI interface{}) (interface{}, error) { pool, err := k8s.NewAPI(core.ExtractClient(ctx)).WaitForPool(&k8s.WaitForPoolRequest{ - Region: respI.(*k8s.Pool).Region, - PoolID: respI.(*k8s.Pool).ID, - Timeout: scw.TimeDurationPtr(poolActionTimeout), + Region: respI.(*k8s.Pool).Region, + PoolID: respI.(*k8s.Pool).ID, + Timeout: scw.TimeDurationPtr(poolActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) switch action { case poolActionCreate: @@ -100,9 +101,10 @@ func k8sPoolWaitCommand() *core.Command { Run: func(ctx context.Context, argsI interface{}) (i interface{}, err error) { api := k8s.NewAPI(core.ExtractClient(ctx)) return api.WaitForPool(&k8s.WaitForPoolRequest{ - Region: argsI.(*k8s.WaitForPoolRequest).Region, - PoolID: argsI.(*k8s.WaitForPoolRequest).PoolID, - Timeout: scw.TimeDurationPtr(poolActionTimeout), + Region: argsI.(*k8s.WaitForPoolRequest).Region, + PoolID: argsI.(*k8s.WaitForPoolRequest).PoolID, + Timeout: scw.TimeDurationPtr(poolActionTimeout), + RetryInterval: core.DefaultRetryInterval, }) }, ArgSpecs: core.ArgSpecs{ diff --git a/internal/namespaces/k8s/v1/helpers_test.go b/internal/namespaces/k8s/v1/helpers_test.go index fb080c5606..08f1c35619 100644 --- a/internal/namespaces/k8s/v1/helpers_test.go +++ b/internal/namespaces/k8s/v1/helpers_test.go @@ -9,12 +9,6 @@ import ( k8s "github.com/scaleway/scaleway-sdk-go/api/k8s/v1" ) -func init() { - if !core.UpdateCassettes { - k8s.RetryInterval = 0 - } -} - const ( kapsuleVersion = "1.17.3" )