@@ -21,21 +21,21 @@ const (
2121 stackpackConfigFile = "stackpack.yaml"
2222)
2323
24- // TestArgs contains arguments for stackpack test command
25- type TestArgs struct {
24+ // TestDeployArgs contains arguments for stackpack test-deploy command
25+ type TestDeployArgs struct {
2626 StackpackDir string
2727 Params map [string ]string
2828 Yes bool
2929 UnlockedStrategy string
3030}
3131
32- // StackpackTestCommand creates the test subcommand
33- func StackpackTestCommand (cli * di.Deps ) * cobra.Command {
34- args := & TestArgs {
32+ // StackpackTestDeployCommand creates the test-deploy subcommand
33+ func StackpackTestDeployCommand (cli * di.Deps ) * cobra.Command {
34+ args := & TestDeployArgs {
3535 Params : make (map [string ]string ),
3636 }
3737 cmd := & cobra.Command {
38- Use : "test" ,
38+ Use : "test-deploy " ,
3939 Short : "Test a stackpack by packaging, uploading, and installing/upgrading" ,
4040 Long : `Test a stackpack by running package, upload, and install/upgrade commands in sequence.
4141
@@ -50,17 +50,17 @@ This command will:
5050The original stackpack directory is left untouched. The version is automatically incremented for each test run.
5151The stackpack name is read from ` + stackpackConfigFile + `, so no --name flag is required.` ,
5252 Example : `# Test stackpack with confirmation
53- sts stackpack test -p "param1=value1"
53+ sts stackpack test-deploy -p "param1=value1"
5454
5555# Skip confirmation prompt
56- sts stackpack test --yes
56+ sts stackpack test-deploy --yes
5757
5858# Test stackpack in specific directory with unlocked strategy
59- sts stackpack test -d ./my-stackpack --yes --unlocked-strategy force
59+ sts stackpack test-deploy -d ./my-stackpack --yes --unlocked-strategy force
6060
6161# Test with custom unlocked strategy
62- sts stackpack test --unlocked-strategy skip --yes` ,
63- RunE : cli .CmdRunEWithApi (RunStackpackTestCommand (args )),
62+ sts stackpack test-deploy --unlocked-strategy skip --yes` ,
63+ RunE : cli .CmdRunEWithApi (RunStackpackTestDeployCommand (args )),
6464 }
6565
6666 cmd .Flags ().StringVarP (& args .StackpackDir , "stackpack-directory" , "d" , "" , "Path to stackpack directory (defaults to current directory)" )
@@ -71,19 +71,19 @@ sts stackpack test --unlocked-strategy skip --yes`,
7171 return cmd
7272}
7373
74- // RunStackpackTestCommand executes the test command
74+ // RunStackpackTestDeployCommand executes the test-deploy command
7575//
7676//nolint:funlen
77- func RunStackpackTestCommand (args * TestArgs ) di.CmdWithApiFn {
77+ func RunStackpackTestDeployCommand (args * TestDeployArgs ) di.CmdWithApiFn {
7878 return func (
7979 cmd * cobra.Command ,
8080 cli * di.Deps ,
8181 api * stackstate_api.APIClient ,
8282 serverInfo * stackstate_api.ServerInfo ,
8383 ) common.CLIError {
84- // Warn if JSON output is requested - not meaningful for test command
84+ // Warn if JSON output is requested - not meaningful for test-deploy command
8585 if cli .IsJson () {
86- cli .Printer .PrintLn ("Warning: JSON output format is not meaningful for the test command, proceeding with text output" )
86+ cli .Printer .PrintLn ("Warning: JSON output format is not meaningful for the test-deploy command, proceeding with text output" )
8787 }
8888
8989 // Set default stackpack directory
@@ -103,7 +103,7 @@ func RunStackpackTestCommand(args *TestArgs) di.CmdWithApiFn {
103103 return common .NewRuntimeError (fmt .Errorf ("failed to parse %s: %w" , stackpackConfigFile , err ))
104104 }
105105
106- cli .Printer .Success ("Starting stackpack test sequence..." )
106+ cli .Printer .Success ("Starting stackpack test-deploy sequence..." )
107107 cli .Printer .PrintLn (fmt .Sprintf (" Stackpack: %s (current version: %s)" , originalInfo .Name , originalInfo .Version ))
108108 cli .Printer .PrintLn ("" )
109109
@@ -239,7 +239,7 @@ func RunStackpackTestCommand(args *TestArgs) di.CmdWithApiFn {
239239 }
240240
241241 cli .Printer .PrintLn ("" )
242- cli .Printer .Success ("🎉 Test sequence completed successfully!" )
242+ cli .Printer .Success ("🎉 Test-deploy sequence completed successfully!" )
243243
244244 // Clean up .sts file
245245 if err := os .Remove (packageArgs .ArchiveFile ); err != nil {
0 commit comments