Skip to content

Commit

Permalink
chore: remove user sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed Sep 19, 2023
1 parent 05264ff commit b36e039
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions internal/provider/resource_application_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
func TestAccResourceApplicationUser(t *testing.T) {
id := fmt.Sprintf("app-user-test-%d", time.Now().UnixNano())
testUserID := "1b305f15-f18f-4357-8311-01f88ed99d1b"
eventualConsistentUserAPITimeout := 30 * time.Second

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -28,9 +27,6 @@ func TestAccResourceApplicationUser(t *testing.T) {
},
// ImportState testing
{
PreConfig: func() {
time.Sleep(eventualConsistentUserAPITimeout)
},
ResourceName: "humanitec_resource_application_user.another_user",
ImportState: true,
ImportStateVerify: true,
Expand All @@ -42,10 +38,6 @@ func TestAccResourceApplicationUser(t *testing.T) {
{
Config: testAccResourceApplicationUser(id, testUserID, "developer"),
Check: resource.ComposeAggregateTestCheckFunc(
func(s *terraform.State) error {
time.Sleep(eventualConsistentUserAPITimeout)
return nil
},
resource.TestCheckResourceAttr("humanitec_resource_application_user.another_user", "role", "developer"),
),
},
Expand Down
8 changes: 0 additions & 8 deletions internal/provider/resource_environment_type_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
func TestAccResourceEnvironmentTypeUser(t *testing.T) {
id := fmt.Sprintf("env-type-user-test-%d", time.Now().UnixNano())
testUserID := "c0725726-0613-43d4-8398-907d07fba2e4"
eventualConsistentUserAPITimeout := 30 * time.Second

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -28,9 +27,6 @@ func TestAccResourceEnvironmentTypeUser(t *testing.T) {
},
// ImportState testing
{
PreConfig: func() {
time.Sleep(eventualConsistentUserAPITimeout)
},
ResourceName: "humanitec_resource_environment_type_user.another_user",
ImportState: true,
ImportStateVerify: true,
Expand All @@ -43,10 +39,6 @@ func TestAccResourceEnvironmentTypeUser(t *testing.T) {
// At the moment there is nothing we can update :-/
Config: testAccResourceEnvironmentTypeUser(id, testUserID, "deployer"),
Check: resource.ComposeAggregateTestCheckFunc(
func(s *terraform.State) error {
time.Sleep(eventualConsistentUserAPITimeout)
return nil
},
resource.TestCheckResourceAttr("humanitec_resource_environment_type_user.another_user", "role", "deployer"),
),
},
Expand Down

0 comments on commit b36e039

Please sign in to comment.