feat: Add custom version names (#4186)

Fixes #4137.
This commit is contained in:
Kyle Carberry
2022-09-23 20:17:36 -05:00
committed by GitHub
parent 3c215a83b6
commit 28428d1294
7 changed files with 17 additions and 3 deletions

View File

@ -122,7 +122,7 @@ func TestTemplatePush(t *testing.T) {
Parse: echo.ParseComplete,
Provision: echo.ProvisionComplete,
})
cmd, root := clitest.New(t, "templates", "push", template.Name, "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
cmd, root := clitest.New(t, "templates", "push", template.Name, "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho), "--name", "example")
clitest.SetupConfig(t, client, root)
pty := ptytest.New(t)
cmd.SetIn(pty.Input())
@ -153,6 +153,7 @@ func TestTemplatePush(t *testing.T) {
require.NoError(t, err)
assert.Len(t, templateVersions, 2)
assert.NotEqual(t, template.ActiveVersionID, templateVersions[1].ID)
require.Equal(t, "example", templateVersions[1].Name)
})
t.Run("UseWorkingDir", func(t *testing.T) {