Skip to content

Commit

Permalink
Merge pull request #306 from digitalocean/e2e/fix-token-error-variabl…
Browse files Browse the repository at this point in the history
…e-name

e2e: fix token error variable name
  • Loading branch information
timoreimann committed Apr 29, 2020
2 parents bcbd4aa + 0a2082f commit 4c5ac3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const (
)

var (
tokenMissingErr = errors.New("token must be specified in DIGITALOCEAN_ACCESS_TOKEN environment variable")
errTokenMissing = errors.New("token must be specified in DIGITALOCEAN_ACCESS_TOKEN environment variable")

// De-facto global variables that require initialization at runtime.
supportedKubernetesVersions = []string{"1.16", "1.15", "1.14"}
Expand Down Expand Up @@ -278,7 +278,7 @@ func TestE2E(t *testing.T) {

func createDOClient(ctx context.Context, token string) (client *godo.Client, err error) {
if token == "" {
return nil, tokenMissingErr
return nil, errTokenMissing
}

tokenSource := oauth2.StaticTokenSource(&oauth2.Token{
Expand Down Expand Up @@ -409,7 +409,7 @@ func deleteCluster(ctx context.Context, client *godo.Client, clusterID string) e
// deployDriver invokes our deploy script with the right set of parameters.
func deployDriver(ctx context.Context, driverImage string, kubeconfigFile, token string) error {
if token == "" {
return tokenMissingErr
return errTokenMissing
}

return runCommand(ctx, deployScriptPath, cmdParams{
Expand Down

0 comments on commit 4c5ac3a

Please sign in to comment.