chore(cli): rename build options to ephemeral parameters in cli (#15030)

This PR aims to rename `build-option` to `ephemeral-parameters` based on
#10488 conversation.

`build-option` has been renamed `ephemeral-parameter` and can be used to
define a value for an ephemeral parameter in the template.

`build-options` has been renamed `prompt-ephemeral-parameters` and can
be used to prompt the user to put values for the ephemeral parameters in
the template.

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: defelmnq <yvincent@coder.com>
This commit is contained in:
Vincent Vielle
2024-10-16 23:54:12 +02:00
committed by GitHub
co-authored by Mathias Fredriksson EdwardAngert defelmnq
parent 512cbf1682
commit 02f6203dc7
16 changed files with 270 additions and 58 deletions
+6 -6
View File
@@ -160,7 +160,7 @@ func TestUpdateWithRichParameters(t *testing.T) {
<-doneChan
})
t.Run("BuildOptions", func(t *testing.T) {
t.Run("PromptEphemeralParameters", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
@@ -186,7 +186,7 @@ func TestUpdateWithRichParameters(t *testing.T) {
err := inv.Run()
assert.NoError(t, err)
inv, root = clitest.New(t, "update", workspaceName, "--build-options")
inv, root = clitest.New(t, "update", workspaceName, "--prompt-ephemeral-parameters")
clitest.SetupConfig(t, member, root)
doneChan := make(chan struct{})
@@ -211,7 +211,7 @@ func TestUpdateWithRichParameters(t *testing.T) {
}
<-doneChan
// Verify if build option is set
// Verify if ephemeral parameter is set
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
defer cancel()
@@ -225,7 +225,7 @@ func TestUpdateWithRichParameters(t *testing.T) {
})
})
t.Run("BuildOptionFlags", func(t *testing.T) {
t.Run("EphemeralParameterFlags", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
@@ -247,7 +247,7 @@ func TestUpdateWithRichParameters(t *testing.T) {
assert.NoError(t, err)
inv, root = clitest.New(t, "update", workspaceName,
"--build-option", fmt.Sprintf("%s=%s", ephemeralParameterName, ephemeralParameterValue))
"--ephemeral-parameter", fmt.Sprintf("%s=%s", ephemeralParameterName, ephemeralParameterValue))
clitest.SetupConfig(t, member, root)
doneChan := make(chan struct{})
@@ -261,7 +261,7 @@ func TestUpdateWithRichParameters(t *testing.T) {
pty.ExpectMatch("Planning workspace")
<-doneChan
// Verify if build option is set
// Verify if ephemeral parameter is set
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
defer cancel()