@@ -38,9 +38,9 @@ func TestCreateCommand(t *testing.T) {
3838 {
3939 name : "minimum required parameters" ,
4040 args : []string {
41- "--title= db-test" ,
42- "--zone= fi-hel1" ,
43- "--hostname-prefix= testdb" ,
41+ "--title" , " db-test" ,
42+ "--zone" , " fi-hel1" ,
43+ "--hostname-prefix" , " testdb" ,
4444 },
4545 createDatabaseReq : request.CreateManagedDatabaseRequest {
4646 Title : "db-test" ,
@@ -53,14 +53,14 @@ func TestCreateCommand(t *testing.T) {
5353 {
5454 name : "pg with label, protection, and version parameters" ,
5555 args : []string {
56- "--title= full-test" ,
57- "--zone= fi-hel1" ,
58- "--hostname-prefix= fulldb" ,
59- "--plan= 4x4xCPU-8GB-200GB" ,
60- "--type= pg" ,
61- "--label= env=test,app=database" ,
56+ "--title" , " full-test" ,
57+ "--zone" , " fi-hel1" ,
58+ "--hostname-prefix" , " fulldb" ,
59+ "--plan" , " 4x4xCPU-8GB-200GB" ,
60+ "--type" , " pg" ,
61+ "--label" , " env=test,app=database" ,
6262 "--enable-termination-protection" ,
63- "--property= version=13" ,
63+ "--property" , " version=13" ,
6464 },
6565 createDatabaseReq : request.CreateManagedDatabaseRequest {
6666 Title : "full-test" ,
@@ -78,16 +78,16 @@ func TestCreateCommand(t *testing.T) {
7878 {
7979 name : "opensearch with properties parameters" ,
8080 args : []string {
81- "--title= full-test" ,
82- "--zone= fi-hel1" ,
83- "--hostname-prefix= fulldb" ,
84- "--plan= 4x4xCPU-8GB-200GB" ,
85- "--type= opensearch" ,
86- "--property= saml={\" enabled\" :true}" , // without quotes
87- "--property= openid=\" {\" client_id\" :\" test_client_id\" }\" " , // with quotes
88- "--property= ism_enabled=true" ,
89- "--property= custom_domain=custom.upcloud.com" ,
90- "--property= numeric_string=123" ,
81+ "--title" , " full-test" ,
82+ "--zone" , " fi-hel1" ,
83+ "--hostname-prefix" , " fulldb" ,
84+ "--plan" , " 4x4xCPU-8GB-200GB" ,
85+ "--type" , " opensearch" ,
86+ "--property" , " saml={\" enabled\" :true}" , // without quotes
87+ "--property" , " openid=\" {\" client_id\" :\" test_client_id\" }\" " , // with quotes
88+ "--property" , " ism_enabled=true" ,
89+ "--property" , " custom_domain=custom.upcloud.com" ,
90+ "--property" , " numeric_string=123" ,
9191 },
9292 createDatabaseReq : request.CreateManagedDatabaseRequest {
9393 Title : "full-test" ,
@@ -107,9 +107,9 @@ func TestCreateCommand(t *testing.T) {
107107 {
108108 name : "mysql default database type" ,
109109 args : []string {
110- "--title= mysql-test" ,
111- "--zone= fi-hel1" ,
112- "--hostname-prefix= mysqldb" ,
110+ "--title" , " mysql-test" ,
111+ "--zone" , " fi-hel1" ,
112+ "--hostname-prefix" , " mysqldb" ,
113113 },
114114 createDatabaseReq : request.CreateManagedDatabaseRequest {
115115 Title : "mysql-test" ,
@@ -122,11 +122,11 @@ func TestCreateCommand(t *testing.T) {
122122 {
123123 name : "maintenance-dow and maintenance-time" ,
124124 args : []string {
125- "--title= mysql-test" ,
126- "--zone= fi-hel1" ,
127- "--hostname-prefix= mysqldb" ,
128- "--maintenance-dow= monday" ,
129- "--maintenance-time= 02:00" ,
125+ "--title" , " mysql-test" ,
126+ "--zone" , " fi-hel1" ,
127+ "--hostname-prefix" , " mysqldb" ,
128+ "--maintenance-dow" , " monday" ,
129+ "--maintenance-time" , " 02:00" ,
130130 },
131131 createDatabaseReq : request.CreateManagedDatabaseRequest {
132132 Title : "mysql-test" ,
@@ -143,24 +143,24 @@ func TestCreateCommand(t *testing.T) {
143143 {
144144 name : "missing required title parameter" ,
145145 args : []string {
146- "--zone= fi-hel1" ,
147- "--hostname-prefix= testdb" ,
146+ "--zone" , " fi-hel1" ,
147+ "--hostname-prefix" , " testdb" ,
148148 },
149149 error : "required flag(s) \" title\" not set" ,
150150 },
151151 {
152152 name : "missing required zone parameter" ,
153153 args : []string {
154- "--title= db-test" ,
155- "--hostname-prefix= testdb" ,
154+ "--title" , " db-test" ,
155+ "--hostname-prefix" , " testdb" ,
156156 },
157157 error : "required flag(s) \" zone\" not set" ,
158158 },
159159 {
160160 name : "missing required hostname-prefix parameter" ,
161161 args : []string {
162- "--title= db-test" ,
163- "--zone= fi-hel1" ,
162+ "--title" , " db-test" ,
163+ "--zone" , " fi-hel1" ,
164164 },
165165 error : "required flag(s) \" hostname-prefix\" not set" ,
166166 },
0 commit comments