@@ -17,7 +17,7 @@ import (
17
17
"github.com/coder/coder/pty/ptytest"
18
18
)
19
19
20
- func TestTemplateUpdate (t * testing.T ) {
20
+ func TestTemplatePush (t * testing.T ) {
21
21
t .Parallel ()
22
22
// NewParameter will:
23
23
// 1. Create a template version with 0 params
@@ -43,7 +43,7 @@ func TestTemplateUpdate(t *testing.T) {
43
43
Parse : createTestParseResponse (),
44
44
Provision : echo .ProvisionComplete ,
45
45
})
46
- cmd , root := clitest .New (t , "templates" , "update " , template .Name , "-y" , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
46
+ cmd , root := clitest .New (t , "templates" , "push " , template .Name , "-y" , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
47
47
clitest .SetupConfig (t , client , root )
48
48
pty := ptytest .New (t )
49
49
cmd .SetIn (pty .Input ())
@@ -76,7 +76,7 @@ func TestTemplateUpdate(t *testing.T) {
76
76
77
77
// Second update of the same source requires no prompt since the params
78
78
// are carried over.
79
- cmd , root = clitest .New (t , "templates" , "update " , template .Name , "-y" , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
79
+ cmd , root = clitest .New (t , "templates" , "push " , template .Name , "-y" , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
80
80
clitest .SetupConfig (t , client , root )
81
81
go func () {
82
82
execDone <- cmd .Execute ()
@@ -95,7 +95,7 @@ func TestTemplateUpdate(t *testing.T) {
95
95
Provision : echo .ProvisionComplete ,
96
96
})
97
97
98
- cmd , root = clitest .New (t , "templates" , "update " , template .Name , "-y" , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
98
+ cmd , root = clitest .New (t , "templates" , "push " , template .Name , "-y" , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
99
99
clitest .SetupConfig (t , client , root )
100
100
go func () {
101
101
execDone <- cmd .Execute ()
@@ -122,7 +122,7 @@ func TestTemplateUpdate(t *testing.T) {
122
122
Parse : echo .ParseComplete ,
123
123
Provision : echo .ProvisionComplete ,
124
124
})
125
- cmd , root := clitest .New (t , "templates" , "update " , template .Name , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
125
+ cmd , root := clitest .New (t , "templates" , "push " , template .Name , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
126
126
clitest .SetupConfig (t , client , root )
127
127
pty := ptytest .New (t )
128
128
cmd .SetIn (pty .Input ())
@@ -175,7 +175,7 @@ func TestTemplateUpdate(t *testing.T) {
175
175
176
176
// Don't pass the name of the template, it should use the
177
177
// directory of the source.
178
- cmd , root := clitest .New (t , "templates" , "update " , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
178
+ cmd , root := clitest .New (t , "templates" , "push " , "--directory" , source , "--test.provisioner" , string (database .ProvisionerTypeEcho ))
179
179
clitest .SetupConfig (t , client , root )
180
180
pty := ptytest .New (t )
181
181
cmd .SetIn (pty .Input ())
0 commit comments