forked from scaleway/scaleway-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom_cluster_test.go
More file actions
34 lines (30 loc) · 888 Bytes
/
custom_cluster_test.go
File metadata and controls
34 lines (30 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package k8s_test
import (
"testing"
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1"
)
func Test_GetCluster(t *testing.T) {
t.Run("Simple", core.Test(&core.TestConfig{
Commands: k8s.GetCommands(),
BeforeFunc: createCluster("get-cluster", false),
Cmd: "scw k8s cluster get {{ .Cluster.ID }}",
Check: core.TestCheckCombine(
core.TestCheckGolden(),
core.TestCheckExitCode(0),
),
AfterFunc: deleteCluster(),
}))
}
func Test_WaitCluster(t *testing.T) {
t.Run("wait for pools", core.Test(&core.TestConfig{
Commands: k8s.GetCommands(),
BeforeFunc: createCluster("wait-cluster", false),
Cmd: "scw k8s cluster wait {{ .Cluster.ID }} wait-for-pools=true",
Check: core.TestCheckCombine(
core.TestCheckGolden(),
core.TestCheckExitCode(0),
),
AfterFunc: deleteCluster(),
}))
}