Skip to content

Commit 656ba86

Browse files
committed
order by name
1 parent 01ae065 commit 656ba86

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

cli/templatepush_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,21 +1106,22 @@ func TestTemplatePush(t *testing.T) {
11061106
pty.ExpectMatchContext(ctx, "Upload")
11071107
pty.WriteLine("yes")
11081108

1109-
pty.ExpectMatchContext(ctx, "var.string_var")
1110-
pty.ExpectMatchContext(ctx, "Enter value:")
1111-
pty.WriteLine("test-string")
1109+
// Variables are prompted in alphabetical order.
1110+
// Boolean variable automatically selects the first option ("true")
1111+
pty.ExpectMatchContext(ctx, "var.bool_var")
11121112

11131113
pty.ExpectMatchContext(ctx, "var.number_var")
11141114
pty.ExpectMatchContext(ctx, "Enter value:")
11151115
pty.WriteLine("42")
11161116

1117-
// Boolean variable automatically selects the first option ("true")
1118-
pty.ExpectMatchContext(ctx, "var.bool_var")
1119-
11201117
pty.ExpectMatchContext(ctx, "var.sensitive_var")
11211118
pty.ExpectMatchContext(ctx, "Enter value:")
11221119
pty.WriteLine("secret-value")
11231120

1121+
pty.ExpectMatchContext(ctx, "var.string_var")
1122+
pty.ExpectMatchContext(ctx, "Enter value:")
1123+
pty.WriteLine("test-string")
1124+
11241125
w.RequireSuccess()
11251126
})
11261127

coderd/database/queries.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/templateversionvariables.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ VALUES
2323
) RETURNING *;
2424

2525
-- name: GetTemplateVersionVariables :many
26-
SELECT * FROM template_version_variables WHERE template_version_id = $1;
26+
SELECT * FROM template_version_variables WHERE template_version_id = $1 ORDER BY name;

0 commit comments

Comments
 (0)