Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c989ee

Browse files
committed
fix: order
1 parent d20626a commit 8c989ee

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cli/update_test.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ func TestUpdateWithRichParameters(t *testing.T) {
167167
Complete: &proto.Provision_Complete{
168168
Parameters: []*proto.RichParameter{
169169
{Name: firstParameterName, Description: firstParameterDescription, Mutable: true},
170-
{Name: secondParameterName, Description: secondParameterDescription, Mutable: true},
171170
{Name: immutableParameterName, Description: immutableParameterDescription, Mutable: false},
171+
{Name: secondParameterName, Description: secondParameterDescription, Mutable: true},
172172
},
173173
},
174174
},
@@ -195,8 +195,8 @@ func TestUpdateWithRichParameters(t *testing.T) {
195195
parameterFile, _ := os.CreateTemp(tempDir, "testParameterFile*.yaml")
196196
_, _ = parameterFile.WriteString(
197197
firstParameterName + ": " + firstParameterValue + "\n" +
198-
secondParameterName + ": " + secondParameterValue + "\n" +
199-
immutableParameterName + ": " + immutableParameterValue)
198+
immutableParameterName + ": " + immutableParameterValue + "\n" +
199+
secondParameterName + ": " + secondParameterValue)
200200

201201
cmd, root := clitest.New(t, "create", "my-workspace", "--template", template.Name, "--rich-parameter-file", parameterFile.Name(), "-y")
202202
clitest.SetupConfig(t, client, root)
@@ -218,14 +218,16 @@ func TestUpdateWithRichParameters(t *testing.T) {
218218

219219
matches := []string{
220220
firstParameterDescription, firstParameterValue,
221+
fmt.Sprintf("Parameter %q is not mutable, so can't be customized after workspace creation.", immutableParameterName), "",
221222
secondParameterDescription, secondParameterValue,
222-
fmt.Sprintf("Parameter %q is not mutable, so can't be customized after workspace creation.", immutableParameterName), "yes",
223223
}
224224
for i := 0; i < len(matches); i += 2 {
225225
match := matches[i]
226226
value := matches[i+1]
227227
pty.ExpectMatch(match)
228-
pty.WriteLine(value)
228+
if value != "" {
229+
pty.WriteLine(value)
230+
}
229231
}
230232
<-doneChan
231233
})

0 commit comments

Comments
 (0)