@@ -17,6 +17,7 @@ func TestListClusters(t *testing.T) {
17
17
{
18
18
"id":18,
19
19
"name":"cluster-1",
20
+ "domain":"example.com",
20
21
"created_at":"2019-01-02T20:18:12.563Z",
21
22
"provider_type":"user",
22
23
"platform_type":"kubernetes",
@@ -56,6 +57,10 @@ func TestListClusters(t *testing.T) {
56
57
if clusters [0 ].ID != 18 {
57
58
t .Errorf ("expected clusterID 1; got %d" , clusters [0 ].ID )
58
59
}
60
+
61
+ if clusters [0 ].Domain != "example.com" {
62
+ t .Errorf ("expected cluster domain example.com; got %q" , clusters [0 ].Domain )
63
+ }
59
64
}
60
65
61
66
func TestGetCluster (t * testing.T ) {
@@ -68,6 +73,7 @@ func TestGetCluster(t *testing.T) {
68
73
response := `{
69
74
"id":18,
70
75
"name":"cluster-1",
76
+ "domain":"example.com",
71
77
"created_at":"2019-01-02T20:18:12.563Z",
72
78
"provider_type":"user",
73
79
"platform_type":"kubernetes",
@@ -131,6 +137,10 @@ func TestGetCluster(t *testing.T) {
131
137
if cluster .ID != 18 {
132
138
t .Errorf ("expected clusterID 18; got %d" , cluster .ID )
133
139
}
140
+
141
+ if cluster .Domain != "example.com" {
142
+ t .Errorf ("expected cluster domain example.com; got %q" , cluster .Domain )
143
+ }
134
144
}
135
145
136
146
func TestAddCluster (t * testing.T ) {
@@ -143,6 +153,7 @@ func TestAddCluster(t *testing.T) {
143
153
response := `{
144
154
"id":24,
145
155
"name":"cluster-5",
156
+ "domain":"example.com",
146
157
"created_at":"2019-01-03T21:53:40.610Z",
147
158
"provider_type":"user",
148
159
"platform_type":"kubernetes",
@@ -218,6 +229,7 @@ func TestEditCluster(t *testing.T) {
218
229
response := `{
219
230
"id":24,
220
231
"name":"new-cluster-name",
232
+ "domain":"example.com",
221
233
"created_at":"2019-01-03T21:53:40.610Z",
222
234
"provider_type":"user",
223
235
"platform_type":"kubernetes",
0 commit comments