Skip to content

Commit

Permalink
fix(tflinter): remove sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
Monitob committed Mar 15, 2022
1 parent 1356249 commit 2ecfb4b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scaleway/resource_container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"io"
"testing"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
Expand All @@ -18,6 +14,8 @@ import (
container "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1"
"github.com/scaleway/scaleway-sdk-go/api/registry/v1"
"github.com/scaleway/scaleway-sdk-go/scw"
"io"
"testing"
)

func TestAccScalewayContainer_Basic(t *testing.T) {
Expand Down Expand Up @@ -332,8 +330,6 @@ func testAddImageToRegistryScaleway(tt *TestTools, n string) resource.TestCheckF
if errorMessage.Error != "" {
return fmt.Errorf(errorMessage.Error)
}
// wait loading images
time.Sleep(2 * time.Second)
}

err = cli.ImageTag(ctx, "docker.io/library/alpine:latest", ns.Endpoint+"/alpine:test")
Expand Down Expand Up @@ -362,9 +358,6 @@ func testAddImageToRegistryScaleway(tt *TestTools, n string) resource.TestCheckF
if errorMessage.Error != "" {
return fmt.Errorf(errorMessage.Error)
}

// wait loading images
time.Sleep(2 * time.Second)
}

_, err = api.WaitForNamespace(&registry.WaitForNamespaceRequest{
Expand Down

0 comments on commit 2ecfb4b

Please sign in to comment.