feat: support partial parameter files (#5392)

Fixes https://github.com/coder/coder/issues/5390
This commit is contained in:
Ricky Grassmuck
2022-12-13 19:58:57 -06:00
committed by GitHub
parent 5a568d8a9b
commit f7baf45ae3
3 changed files with 49 additions and 11 deletions

View File

@ -187,14 +187,25 @@ func TestTemplateCreate(t *testing.T) {
match string
write string
}{
{match: "Create and upload", write: "yes"},
{
match: "Create and upload",
write: "yes",
},
{
match: "Enter a value:",
write: "bingo",
},
{
match: "Confirm create?",
write: "yes",
},
}
for _, m := range matches {
pty.ExpectMatch(m.match)
pty.WriteLine(m.write)
}
require.EqualError(t, <-execDone, "Parameter value absent in parameter file for \"region\"!")
require.NoError(t, <-execDone)
})
t.Run("Recreate template with same name (create, delete, create)", func(t *testing.T) {