@@ -101,8 +101,8 @@ func Test_UpdateInstance(t *testing.T) {
101101 Cmd : "scw rdb instance update {{ .Instance.ID }} settings.0.name=timezone settings.0.value=UTC --wait" ,
102102 Check : core .TestCheckCombine (
103103 func (t * testing.T , ctx * core.CheckFuncCtx ) {
104- assert .Equal (t , "timezone" , ctx .Result .(* rdb.Instance ).Settings [6 ].Name )
105- assert .Equal (t , "UTC" , ctx .Result .(* rdb.Instance ).Settings [6 ].Value )
104+ assert .Equal (t , "timezone" , ctx .Result .(* rdb.Instance ).Settings [5 ].Name )
105+ assert .Equal (t , "UTC" , ctx .Result .(* rdb.Instance ).Settings [5 ].Value )
106106 },
107107 core .TestCheckGolden (),
108108 core .TestCheckExitCode (0 ),
@@ -116,8 +116,8 @@ func Test_UpdateInstance(t *testing.T) {
116116 Cmd : "scw rdb instance update {{ .Instance.ID }} settings.0.name=work_mem settings.0.value=8 --wait" ,
117117 Check : core .TestCheckCombine (
118118 func (t * testing.T , ctx * core.CheckFuncCtx ) {
119- assert .Equal (t , "work_mem" , ctx .Result .(* rdb.Instance ).Settings [0 ].Name )
120- assert .Equal (t , "8" , ctx .Result .(* rdb.Instance ).Settings [0 ].Value )
119+ assert .Equal (t , "work_mem" , ctx .Result .(* rdb.Instance ).Settings [5 ].Name )
120+ assert .Equal (t , "8" , ctx .Result .(* rdb.Instance ).Settings [5 ].Value )
121121 },
122122 core .TestCheckGolden (),
123123 core .TestCheckExitCode (0 ),
@@ -141,14 +141,14 @@ func Test_UpdateInstance(t *testing.T) {
141141 " name=foo2 --wait" ,
142142 Check : core .TestCheckCombine (
143143 func (t * testing.T , ctx * core.CheckFuncCtx ) {
144- assert .Equal (t , "work_mem " , ctx .Result .(* rdb.Instance ).Settings [0 ].Name )
145- assert .Equal (t , "16 " , ctx .Result .(* rdb.Instance ).Settings [0 ].Value )
146- assert .Equal (t , "max_connections " , ctx .Result .(* rdb.Instance ).Settings [1 ].Name )
147- assert .Equal (t , "150 " , ctx .Result .(* rdb.Instance ).Settings [1 ].Value )
148- assert .Equal (t , "effective_cache_size " , ctx .Result .(* rdb.Instance ).Settings [2 ].Name )
149- assert .Equal (t , "1200 " , ctx .Result .(* rdb.Instance ).Settings [2 ].Value )
150- assert .Equal (t , "maintenance_work_mem " , ctx .Result .(* rdb.Instance ).Settings [3 ].Name )
151- assert .Equal (t , "200 " , ctx .Result .(* rdb.Instance ).Settings [3 ].Value )
144+ assert .Equal (t , "effective_cache_size " , ctx .Result .(* rdb.Instance ).Settings [0 ].Name )
145+ assert .Equal (t , "1200 " , ctx .Result .(* rdb.Instance ).Settings [0 ].Value )
146+ assert .Equal (t , "maintenance_work_mem " , ctx .Result .(* rdb.Instance ).Settings [1 ].Name )
147+ assert .Equal (t , "200 " , ctx .Result .(* rdb.Instance ).Settings [1 ].Value )
148+ assert .Equal (t , "max_connections " , ctx .Result .(* rdb.Instance ).Settings [2 ].Name )
149+ assert .Equal (t , "150 " , ctx .Result .(* rdb.Instance ).Settings [2 ].Value )
150+ assert .Equal (t , "work_mem " , ctx .Result .(* rdb.Instance ).Settings [5 ].Name )
151+ assert .Equal (t , "16 " , ctx .Result .(* rdb.Instance ).Settings [5 ].Value )
152152 assert .Equal (t , "foo2" , ctx .Result .(* rdb.Instance ).Name )
153153 },
154154 core .TestCheckGolden (),
0 commit comments