diff --git a/cmd/kosli/beginTrail.go b/cmd/kosli/beginTrail.go index fced4c86..108ed8ee 100644 --- a/cmd/kosli/beginTrail.go +++ b/cmd/kosli/beginTrail.go @@ -15,7 +15,10 @@ const beginTrailShortDesc = `Begin or update a Kosli flow trail.` const beginTrailLongDesc = beginTrailShortDesc + ` You can optionally associate the trail to a git commit using ^--commit^ (requires access to a git repo). And you -can optionally redact some of the git commit data sent to Kosli using ^--redact-commit-info^` +can optionally redact some of the git commit data sent to Kosli using ^--redact-commit-info^. + +A legal ^TRAIL-NAME^ must start with an alphanumeric and only contain alphanumeric characters, ^.^, ^-^, ^_^ and ^~^. +` const beginTrailExample = ` # begin/update a Kosli flow trail: diff --git a/cmd/kosli/beginTrail_test.go b/cmd/kosli/beginTrail_test.go index a4b81336..71b4dbe0 100644 --- a/cmd/kosli/beginTrail_test.go +++ b/cmd/kosli/beginTrail_test.go @@ -39,7 +39,7 @@ func (suite *BeginTrailCommandTestSuite) TestBeginTrailCmd() { wantError: true, name: "fails when name is considered invalid by the server", cmd: fmt.Sprintf("begin trail foo?$bar --flow %s %s", suite.flowName, suite.defaultKosliArguments), - golden: "Error: Input payload validation failed: map[name:'foo?$bar' does not match '^[a-zA-Z0-9][a-zA-Z0-9\\\\-_\\\\.~]*$']\n", + golden: "Error: Input payload validation failed: map[name:'foo?$bar' does not match '^[a-zA-Z0-9][a-zA-Z0-9\\\\.\\\\-_~]*$']\n", }, { wantError: true, diff --git a/cmd/kosli/createEnvironment.go b/cmd/kosli/createEnvironment.go index 37bcec5b..f323dee3 100644 --- a/cmd/kosli/createEnvironment.go +++ b/cmd/kosli/createEnvironment.go @@ -37,6 +37,8 @@ it off again with the --exclude-scaling. Logical environments are used for grouping of physical environments. For instance **prod-aws** and **prod-s3** can be grouped into logical environment **prod**. Logical environments are view-only, you can not report snapshots to them. + +A legal ^ENVIRONMENT-NAME^ must start with an alphanumeric and only contain alphanumeric characters, ^.^, ^-^, ^_^ and ^~^. ` const createEnvironmentExample = ` diff --git a/cmd/kosli/createFlow.go b/cmd/kosli/createFlow.go index 5f19f02a..0ababde6 100644 --- a/cmd/kosli/createFlow.go +++ b/cmd/kosli/createFlow.go @@ -16,7 +16,10 @@ import ( const createFlowShortDesc = `Create or update a Kosli flow.` const createFlowLongDesc = createFlowShortDesc + ` -You can specify flow parameters in flags.` +You can specify flow parameters in flags. + +A legal ^FLOW-NAME^ must start with an alphanumeric and only contain alphanumeric characters, ^.^, ^-^, ^_^ and ^~^. +` const createFlowExample = ` # create/update a Kosli flow (with empty template): diff --git a/cmd/kosli/snapshotECS_test.go b/cmd/kosli/snapshotECS_test.go index 4e01b616..48228bcc 100644 --- a/cmd/kosli/snapshotECS_test.go +++ b/cmd/kosli/snapshotECS_test.go @@ -72,8 +72,11 @@ func (suite *SnapshotECSTestSuite) TestSnapshotECSCmd() { golden: "Error: only one of --cluster, --clusters, --exclude-regex is allowed\n", }, { - name: "snapshot ECS works if no filtering flags are used", - cmd: fmt.Sprintf(`snapshot ecs %s %s`, suite.envName, suite.defaultKosliArguments), + name: "snapshot ECS works if no filtering flags are used", + cmd: fmt.Sprintf(`snapshot ecs %s %s`, suite.envName, suite.defaultKosliArguments), + additionalConfig: snapshotECSTestConfig{ + requireAuthToBeSet: true, + }, goldenRegex: "\\[\\d+\\] containers were reported to environment snapshot-ecs-env\n", }, {