-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error text from astra is displayed again, terminate will wait on fail…
…ed terminates
- Loading branch information
Ryan SVIHLA
committed
Feb 14, 2022
1 parent
aae1080
commit 1ff6e14
Showing
9 changed files
with
81 additions
and
162 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,21 +111,6 @@ func TestCreateSetsKeyspace(t *testing.T) { | |
} | ||
} | ||
|
||
func TestCreateSetsCapacityUnit(t *testing.T) { | ||
mockClient := &tests.MockClient{} | ||
createDbCapacityUnit = 10000 | ||
err := executeCreate(func() (pkg.Client, error) { | ||
return mockClient, nil | ||
}) | ||
if err != nil { | ||
t.Fatalf("unexpected error '%v'", err) | ||
} | ||
arg0 := mockClient.Call(0).(astraops.DatabaseInfoCreate) | ||
if arg0.CapacityUnits != createDbCapacityUnit { | ||
t.Errorf("expected '%v' but was '%v'", arg0.CapacityUnits, createDbCapacityUnit) | ||
} | ||
} | ||
|
||
func TestCreateSetsRegion(t *testing.T) { | ||
mockClient := &tests.MockClient{} | ||
createDbRegion = "EU-West1" | ||
|
@@ -141,39 +126,6 @@ func TestCreateSetsRegion(t *testing.T) { | |
} | ||
} | ||
|
||
func TestCreateSetsUser(t *testing.T) { | ||
mockClient := &tests.MockClient{} | ||
// sets createDbUser on the package variable in cmd/db/create.go | ||
createDbUser = "[email protected]" | ||
err := executeCreate(func() (pkg.Client, error) { | ||
return mockClient, nil | ||
}) | ||
if err != nil { | ||
t.Fatalf("unexpected error '%v'", err) | ||
} | ||
arg0 := mockClient.Call(0).(astraops.DatabaseInfoCreate) | ||
if arg0.User != &createDbUser { | ||
user := *arg0.User | ||
t.Errorf("expected '%v' but was '%v'", user, createDbUser) | ||
} | ||
} | ||
|
||
func TestCreateSetsPass(t *testing.T) { | ||
mockClient := &tests.MockClient{} | ||
// sets createDbPassword on the package variable in cmd/db/create.go | ||
createDbPassword = "afdfdf" | ||
err := executeCreate(func() (pkg.Client, error) { | ||
return mockClient, nil | ||
}) | ||
if err != nil { | ||
t.Fatalf("unexpected error '%v'", err) | ||
} | ||
arg0 := mockClient.Call(0).(astraops.DatabaseInfoCreate) | ||
if arg0.Password != &createDbPassword { | ||
t.Errorf("expected '%v' but was '%v'", *arg0.Password, createDbPassword) | ||
} | ||
} | ||
|
||
func TestCreateSetsTier(t *testing.T) { | ||
mockClient := &tests.MockClient{} | ||
createDbTier = "afdfdf" | ||
|
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
Oops, something went wrong.