@@ -51,8 +51,8 @@ func TestScaleClusterNonTLS(t *testing.T) {
51
51
52
52
// Add 2 DBServers, 1 coordinator
53
53
updated , err := updateDeployment (c , depl .GetName (), ns , func (spec * api.DeploymentSpec ) {
54
- spec .DBServers .Count = 5
55
- spec .Coordinators .Count = 4
54
+ spec .DBServers .Count = util . NewInt ( 5 )
55
+ spec .Coordinators .Count = util . NewInt ( 4 )
56
56
})
57
57
if err != nil {
58
58
t .Fatalf ("Failed to update deployment: %v" , err )
@@ -67,8 +67,8 @@ func TestScaleClusterNonTLS(t *testing.T) {
67
67
68
68
// Remove 3 DBServers, 2 coordinator
69
69
updated , err = updateDeployment (c , depl .GetName (), ns , func (spec * api.DeploymentSpec ) {
70
- spec .DBServers .Count = 3
71
- spec .Coordinators .Count = 2
70
+ spec .DBServers .Count = util . NewInt ( 3 )
71
+ spec .Coordinators .Count = util . NewInt ( 2 )
72
72
})
73
73
if err != nil {
74
74
t .Fatalf ("Failed to update deployment: %v" , err )
@@ -93,7 +93,7 @@ func TestScaleCluster(t *testing.T) {
93
93
94
94
// Prepare deployment config
95
95
depl := newDeployment ("test-scale" + uniuri .NewLen (4 ))
96
- depl .Spec .Mode = api .DeploymentModeCluster
96
+ depl .Spec .Mode = api .NewMode ( api . DeploymentModeCluster )
97
97
depl .Spec .TLS = api.TLSSpec {} // should auto-generate cert
98
98
depl .Spec .SetDefaults (depl .GetName ()) // this must be last
99
99
@@ -121,8 +121,8 @@ func TestScaleCluster(t *testing.T) {
121
121
122
122
// Add 2 DBServers, 1 coordinator
123
123
updated , err := updateDeployment (c , depl .GetName (), ns , func (spec * api.DeploymentSpec ) {
124
- spec .DBServers .Count = 5
125
- spec .Coordinators .Count = 4
124
+ spec .DBServers .Count = util . NewInt ( 5 )
125
+ spec .Coordinators .Count = util . NewInt ( 4 )
126
126
})
127
127
if err != nil {
128
128
t .Fatalf ("Failed to update deployment: %v" , err )
@@ -137,8 +137,8 @@ func TestScaleCluster(t *testing.T) {
137
137
138
138
// Remove 3 DBServers, 2 coordinator
139
139
updated , err = updateDeployment (c , depl .GetName (), ns , func (spec * api.DeploymentSpec ) {
140
- spec .DBServers .Count = 3
141
- spec .Coordinators .Count = 2
140
+ spec .DBServers .Count = util . NewInt ( 3 )
141
+ spec .Coordinators .Count = util . NewInt ( 2 )
142
142
})
143
143
if err != nil {
144
144
t .Fatalf ("Failed to update deployment: %v" , err )
0 commit comments