@@ -4,17 +4,15 @@ import (
4
4
"fmt"
5
5
"testing"
6
6
7
- "github.com/coder/coder/v2/codersdk"
8
- "github.com/coder/coder/v2/testutil"
9
-
10
- "github.com/coder/coder/v2/provisioner/echo"
11
- "github.com/coder/coder/v2/provisionersdk/proto"
12
-
13
7
"github.com/stretchr/testify/require"
14
8
15
9
"github.com/coder/coder/v2/cli/clitest"
16
10
"github.com/coder/coder/v2/coderd/coderdtest"
11
+ "github.com/coder/coder/v2/codersdk"
12
+ "github.com/coder/coder/v2/provisioner/echo"
13
+ "github.com/coder/coder/v2/provisionersdk/proto"
17
14
"github.com/coder/coder/v2/pty/ptytest"
15
+ "github.com/coder/coder/v2/testutil"
18
16
)
19
17
20
18
func TestTemplatePresets (t * testing.T ) {
@@ -114,6 +112,8 @@ func TestTemplatePresets(t *testing.T) {
114
112
require .NoError (t , runErr )
115
113
116
114
// Should: return the active version's presets sorted by name
115
+ message := fmt .Sprintf ("Showing presets for template %q and template version %q." , template .Name , version .Name )
116
+ pty .ExpectMatch (message )
117
117
pty .ExpectRegexMatch (`preset-default\s+k1=v2\s+true\s+0` )
118
118
// The parameter order is not guaranteed in the output, so we match both possible orders
119
119
pty .ExpectRegexMatch (`preset-multiple-params\s+(k1=v1,k2=v2)|(k2=v2,k1=v1)\s+false\s+-` )
@@ -203,6 +203,8 @@ func TestTemplatePresets(t *testing.T) {
203
203
require .NoError (t , runErr )
204
204
205
205
// Should: return the specified version's presets sorted by name
206
+ message := fmt .Sprintf ("Showing presets for template %q and template version %q." , template .Name , version .Name )
207
+ pty .ExpectMatch (message )
206
208
pty .ExpectRegexMatch (`preset-default\s+k1=v2\s+true\s+0` )
207
209
// The parameter order is not guaranteed in the output, so we match both possible orders
208
210
pty .ExpectRegexMatch (`preset-multiple-params\s+(k1=v1,k2=v2)|(k2=v2,k1=v1)\s+false\s+-` )
0 commit comments