(t *testing.T)
| 338 | } |
| 339 | |
| 340 | func TestAddCommandArgs(t *testing.T) { |
| 341 | cmd := NewAddCommand(validateEngineStub) |
| 342 | |
| 343 | // Test that Args validator is set (MinimumNArgs(1)) |
| 344 | require.NotNil(t, cmd.Args, "Args validator should be set") |
| 345 | |
| 346 | // Verify it requires at least 1 arg |
| 347 | err := cmd.Args(cmd, []string{}) |
| 348 | require.Error(t, err, "Should error with no arguments") |
| 349 | |
| 350 | err = cmd.Args(cmd, []string{"workflow1"}) |
| 351 | require.NoError(t, err, "Should not error with 1 argument") |
| 352 | |
| 353 | err = cmd.Args(cmd, []string{"workflow1", "workflow2"}) |
| 354 | require.NoError(t, err, "Should not error with multiple arguments") |
| 355 | } |
| 356 | |
| 357 | // TestAddMultipleWorkflowsNameFlag verifies that --name is not allowed when multiple workflows are specified. |
| 358 | func TestAddMultipleWorkflowsNameFlag(t *testing.T) { |
nothing calls this directly
no test coverage detected