diff --git a/cmd/root/root_test.go b/cmd/root/root_test.go index 2908b679..f22efe7a 100644 --- a/cmd/root/root_test.go +++ b/cmd/root/root_test.go @@ -52,7 +52,7 @@ func (suite *CmdAdditionalHelpSuite) SetupSuite() { b += "In this file you can set the values for the global `lstn` configurations.\n" b += "Anyways, notice that environment variables, and flags (if any) override the values in your configuration file.\n\n" b += "Here's an example of a configuration file (with the default values):\n\n" - b += "```yaml\nendpoint: http://127.0.0.1:3000\nloglevel: info\ntimeout: 60\n```\n" + b += "```yaml\nendpoint: https://npm.listen.dev\nloglevel: info\ntimeout: 60\n```\n" suite.expectedOuts[Config] = b b = "# lstn environment variables\n\n" @@ -63,7 +63,7 @@ func (suite *CmdAdditionalHelpSuite) SetupSuite() { b += "`LSTN_TIMEOUT`: timeout in seconds\n\n" suite.expectedOuts[Environment] = b - suite.expectedOuts[Manual] = "# lstn cheatsheet\n\n## Global Flags\n\nEvery child command inherits the following flags:\n\n```\n--config string config file (default is $HOME/.lstn.yaml)\n--endpoint string the listen.dev endpoint emitting the verdicts (default \"http://127.0.0.1:3000\")\n--loglevel string log level (default \"info\")\n--timeout int timeout in seconds (default 60)\n```\n\n## `lstn completion`\n\nGenerate the autocompletion script for the specified shell.\n\n### `lstn completion bash`\n\nGenerate the autocompletion script for bash.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n### `lstn completion fish [flags]`\n\nGenerate the autocompletion script for fish.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n### `lstn completion powershell [flags]`\n\nGenerate the autocompletion script for powershell.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n### `lstn completion zsh [flags]`\n\nGenerate the autocompletion script for zsh.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n## `lstn config`\n\nDetails about the ~/.lstn.yaml config file.\n\n```\n-h, --help help for config\n```\n\n## `lstn environment`\n\nWhich environment variables you can use with lstn.\n\n```\n-h, --help help for environment\n```\n\n## `lstn exit`\n\nDetails about the lstn exit codes.\n\n## `lstn help [command]`\n\nHelp about any command.\n\n## `lstn in `\n\nInspect the verdicts of your dependencies.\n\n```\n-q, --jq string filter the output using a jq expression\n --json output the verdicts (if any) in JSON form\n```\n\nFor example:\n\n```bash\nlstn in\nlstn in .\nlstn in /we/snitch\nlstn in sub/dir\n```\n\n## `lstn manual`\n\nA comprehensive reference of all the lstn commands.\n\n```\n-h, --help help for manual\n```\n\n## `lstn to [version] [shasum]`\n\nGet the verdicts of a package.\n\n```\n-q, --jq string filter the output using a jq expression\n --json output the verdicts (if any) in JSON form\n```\n\nFor example:\n\n```bash\nlstn to chalk\nlstn to debug 4.3.4\n```\n\n## `lstn version`\n\nPrint out version information.\n\n" + suite.expectedOuts[Manual] = "# lstn cheatsheet\n\n## Global Flags\n\nEvery child command inherits the following flags:\n\n```\n--config string config file (default is $HOME/.lstn.yaml)\n--endpoint string the listen.dev endpoint emitting the verdicts (default \"https://npm.listen.dev\")\n--loglevel string log level (default \"info\")\n--timeout int timeout in seconds (default 60)\n```\n\n## `lstn completion`\n\nGenerate the autocompletion script for the specified shell.\n\n### `lstn completion bash`\n\nGenerate the autocompletion script for bash.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n### `lstn completion fish [flags]`\n\nGenerate the autocompletion script for fish.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n### `lstn completion powershell [flags]`\n\nGenerate the autocompletion script for powershell.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n### `lstn completion zsh [flags]`\n\nGenerate the autocompletion script for zsh.\n\n```\n--no-descriptions disable completion descriptions\n```\n\n## `lstn config`\n\nDetails about the ~/.lstn.yaml config file.\n\n```\n-h, --help help for config\n```\n\n## `lstn environment`\n\nWhich environment variables you can use with lstn.\n\n```\n-h, --help help for environment\n```\n\n## `lstn exit`\n\nDetails about the lstn exit codes.\n\n## `lstn help [command]`\n\nHelp about any command.\n\n## `lstn in `\n\nInspect the verdicts of your dependencies.\n\n```\n-q, --jq string filter the output using a jq expression\n --json output the verdicts (if any) in JSON form\n```\n\nFor example:\n\n```bash\nlstn in\nlstn in .\nlstn in /we/snitch\nlstn in sub/dir\n```\n\n## `lstn manual`\n\nA comprehensive reference of all the lstn commands.\n\n```\n-h, --help help for manual\n```\n\n## `lstn to [version] [shasum]`\n\nGet the verdicts of a package.\n\n```\n-q, --jq string filter the output using a jq expression\n --json output the verdicts (if any) in JSON form\n```\n\nFor example:\n\n```bash\nlstn to chalk\nlstn to debug 4.3.4\n```\n\n## `lstn version`\n\nPrint out version information.\n\n" b = "The lstn CLI follows the usual conventions regarding exit codes.\n\n" b += "Meaning:\n\n" diff --git a/pkg/cmd/flags/config_test.go b/pkg/cmd/flags/config_test.go index 542cd65c..de830b9a 100644 --- a/pkg/cmd/flags/config_test.go +++ b/pkg/cmd/flags/config_test.go @@ -57,7 +57,7 @@ func (suite *FlagsConfigSuite) TestGetConfigFlagsDefaults() { assert.Equal(suite.T(), 3, len(m)) expected := make(map[string]string) - expected["endpoint"] = "http://127.0.0.1:3000" + expected["endpoint"] = "https://npm.listen.dev" expected["loglevel"] = "info" expected["timeout"] = "60"