forked from hashicorp/go-tfe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use 45 seconds as default for all runs
- Loading branch information
Sander van Harmelen
committed
Apr 24, 2019
1 parent
222a23d
commit 20ff794
Showing
3 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,7 +262,7 @@ func createOAuthToken(t *testing.T, client *Client, org *Organization) (*OAuthTo | |
func createOrganization(t *testing.T, client *Client) (*Organization, func()) { | ||
ctx := context.Background() | ||
org, err := client.Organizations.Create(ctx, OrganizationCreateOptions{ | ||
Name: String("go-" + randomString(t)), | ||
Name: String("tst-" + randomString(t)), | ||
Email: String(fmt.Sprintf("%[email protected]", randomString(t))), | ||
}) | ||
if err != nil { | ||
|
@@ -349,7 +349,7 @@ func createPlannedRun(t *testing.T, client *Client, w *Workspace) (*Run, func()) | |
|
||
if i > 45 { | ||
rCleanup() | ||
t.Fatal("45 second timeout waiting for run to be planned") | ||
t.Fatal("Timeout waiting for run to be applied") | ||
} | ||
|
||
time.Sleep(1 * time.Second) | ||
|
@@ -372,19 +372,18 @@ func createAppliedRun(t *testing.T, client *Client, w *Workspace) (*Run, func()) | |
} | ||
|
||
if r.Status == RunApplied { | ||
break | ||
return r, rCleanup | ||
} | ||
|
||
if i > 30 { | ||
if i > 45 { | ||
rCleanup() | ||
t.Fatal("Timeout waiting for run to be applied") | ||
} | ||
|
||
time.Sleep(1 * time.Second) | ||
} | ||
|
||
return r, rCleanup | ||
} | ||
|
||
func createSSHKey(t *testing.T, client *Client, org *Organization) (*SSHKey, func()) { | ||
var orgCleanup func() | ||
|
||
|