@@ -17,7 +17,7 @@ import (
1717 "github.com/coder/coder/pty/ptytest"
1818)
1919
20- func TestTemplateUpdate (t * testing.T ) {
20+ func TestTemplatePush (t * testing.T ) {
2121 t .Parallel ()
2222 // NewParameter will:
2323 // 1. Create a template version with 0 params
@@ -43,7 +43,7 @@ func TestTemplateUpdate(t *testing.T) {
4343 Parse : createTestParseResponse (),
4444 Provision : echo .ProvisionComplete ,
4545 })
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 ))
4747 clitest .SetupConfig (t , client , root )
4848 pty := ptytest .New (t )
4949 cmd .SetIn (pty .Input ())
@@ -76,7 +76,7 @@ func TestTemplateUpdate(t *testing.T) {
7676
7777 // Second update of the same source requires no prompt since the params
7878 // 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 ))
8080 clitest .SetupConfig (t , client , root )
8181 go func () {
8282 execDone <- cmd .Execute ()
@@ -95,7 +95,7 @@ func TestTemplateUpdate(t *testing.T) {
9595 Provision : echo .ProvisionComplete ,
9696 })
9797
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 ))
9999 clitest .SetupConfig (t , client , root )
100100 go func () {
101101 execDone <- cmd .Execute ()
@@ -122,7 +122,7 @@ func TestTemplateUpdate(t *testing.T) {
122122 Parse : echo .ParseComplete ,
123123 Provision : echo .ProvisionComplete ,
124124 })
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 ))
126126 clitest .SetupConfig (t , client , root )
127127 pty := ptytest .New (t )
128128 cmd .SetIn (pty .Input ())
@@ -175,7 +175,7 @@ func TestTemplateUpdate(t *testing.T) {
175175
176176 // Don't pass the name of the template, it should use the
177177 // 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 ))
179179 clitest .SetupConfig (t , client , root )
180180 pty := ptytest .New (t )
181181 cmd .SetIn (pty .Input ())
0 commit comments