Skip to content

Typechecked should be a boolean #739

Typechecked should be a boolean

Typechecked should be a boolean #739

GitHub Actions / JUnit Test Report failed Dec 16, 2024 in 0s

252 tests run, 251 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 48 in test/database/create.mjs

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

/home/runner/work/fauna-shell/fauna-shell/test/database/create.mjs.database create validates invalid arguments: database create --name 'testdb' --secret 'secret' --typechecked 'imastring'

expected stderr to have been called with arguments { test: [Function],
  message: 'match("Invalid value for option typechecked: imastring")' }
'"\\u001b[0mfauna database create\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mCreate a child database.\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mOutput:\\u001b[0m\\n\\u001b[0m      --color  Enable color formatting for the output. Uses ANSI escape codes. Enabled by default if supported by the terminal. Use `--no-color` or `--color=false` to disable.  [boolean] [default: true]\\u001b[0m\\n\\u001b[0m      --json   Output the results as JSON.  [boolean] [default: false]\\u001b[0m\\n\\u001b[0m      --quiet  Only output the results of the command. Useful for scripts, CI/CD, and automation workflows.  [boolean] [default: false]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mConfig:\\u001b[0m\\n\\u001b[0m      --config   Path to a CLI config file to use. Use `--profile` to select a profile from the file.  [string] [default: \\".\\"]\\u001b[0m\\n\\u001b[0m  -p, --profile  Profile from the CLI config file to use. Each profile specifies a set of CLI settings. Defaults to the \'default\' profile when a config file is provided.  [string]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mDebug:\\u001b[0m\\n\\u001b[0m      --verboseComponent  Components to emit diagnostic logs for. Takes precedence over the `--verbosity` flag. Pass components as a space-separated list, such as `--verboseComponent fetch error`, or as separate flags, such as `--verboseComponent fetch --verboseComponent error`.  [array] [choices: \\"fetch\\", \\"error\\", \\"config\\", \\"argv\\", \\"creds\\", \\"completion\\"] [default: []]\\u001b[0m\\n\\u001b[0m      --verbosity         Maximum verbosity level for log messages. Accepts 1 (fatal) to 5 (debug). Lower values represent more critical logs.  [number] [default: 0]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mAPI:\\u001b[0m\\n\\u001b[0m  -u, --user        User used to run the command. You must first log in as the user using `fauna login`.  [string] [default: \\"default\\"]\\u001b[0m\\n\\u001b[0m      --local       Use a local Fauna container. If not otherwise specified, sets `--url` to http://localhost:8443 and `--secret` to \\"secret\\".  [boolean] [default: false]\\u001b[0m\\n\\u001b[0m      --url         URL for Fauna Core HTTP API requests made by the command. Defaults to https://db.fauna.com.  [string]\\u001b[0m\\n\\u001b[0m      --secret      Authentication secret for Fauna Core HTTP API requests made by the command. Mutually exclusive with `--database` and `--role`.  [string]\\u001b[0m\\n\\u001b[0m      --accountKey  Fauna account key used for authentication. Negates the need for a user login. The key is used to generate short-lived database secrets for the CLI. Mutually exclusive with `--user` and `--secret`.  [string]\\u001b[0m\\n\\u001b[0m  -d, --database    Path, including Region Group identifier and hierarchy, for the database to run the command in. Mutually exclusive with `--secret`.  [string]\\u001b[0m\\n\\u001b[0m  -r, --role        Role used to run the command. Mutually exclusive with `--secret`.  [string]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mOptions:\\u001b[0m\\n\\u001b[0m  -h, --help         Show help.  [boolean]\\u001b[0m\\n\\u001b[0m      --version      Show the fauna CLI version.  [boolean]\\u001b[0m\\n\\u001b[0m      --name         Name of the child database to create.  [string] [required]\\u001b[0m\\n\\u001b[0m      --typechecked  Enable typechecking for the database. Defaults to the typechecking setting of the parent database.  [boolean]\\u001b[0m\\n\\u001b[0m      --protected    Enable protected mode for the database. Protected mode disallows destructive schema changes.  [boolean]\\u001b[0m\\n\\u001b[0m      --priority     User-defined priority for the database.  [number]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mExamples:\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --database us/example                Create a database named \'my_database\' directly under \'us/example\'.\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --secret my-secret                   Create a database named \'my_database\' directly under the database scoped to a secret.\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --database us/example --typechecked  Create a database with typechecking enabled.\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --database us/example --protected    Create a database with protected mode enabled.\\u001b[0m\\n\\n\\u001b[31mUnknown command: \'imastring\'\\u001b[39m"' match("Invalid value for option typechecked: imastring")
Raw output
AssertionError: expected stderr to have been called with arguments { test: [Function],
  message: 'match("Invalid value for option typechecked: imastring")' }
'"\\u001b[0mfauna database create\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mCreate a child database.\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mOutput:\\u001b[0m\\n\\u001b[0m      --color  Enable color formatting for the output. Uses ANSI escape codes. Enabled by default if supported by the terminal. Use `--no-color` or `--color=false` to disable.  [boolean] [default: true]\\u001b[0m\\n\\u001b[0m      --json   Output the results as JSON.  [boolean] [default: false]\\u001b[0m\\n\\u001b[0m      --quiet  Only output the results of the command. Useful for scripts, CI/CD, and automation workflows.  [boolean] [default: false]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mConfig:\\u001b[0m\\n\\u001b[0m      --config   Path to a CLI config file to use. Use `--profile` to select a profile from the file.  [string] [default: \\".\\"]\\u001b[0m\\n\\u001b[0m  -p, --profile  Profile from the CLI config file to use. Each profile specifies a set of CLI settings. Defaults to the \'default\' profile when a config file is provided.  [string]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mDebug:\\u001b[0m\\n\\u001b[0m      --verboseComponent  Components to emit diagnostic logs for. Takes precedence over the `--verbosity` flag. Pass components as a space-separated list, such as `--verboseComponent fetch error`, or as separate flags, such as `--verboseComponent fetch --verboseComponent error`.  [array] [choices: \\"fetch\\", \\"error\\", \\"config\\", \\"argv\\", \\"creds\\", \\"completion\\"] [default: []]\\u001b[0m\\n\\u001b[0m      --verbosity         Maximum verbosity level for log messages. Accepts 1 (fatal) to 5 (debug). Lower values represent more critical logs.  [number] [default: 0]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mAPI:\\u001b[0m\\n\\u001b[0m  -u, --user        User used to run the command. You must first log in as the user using `fauna login`.  [string] [default: \\"default\\"]\\u001b[0m\\n\\u001b[0m      --local       Use a local Fauna container. If not otherwise specified, sets `--url` to http://localhost:8443 and `--secret` to \\"secret\\".  [boolean] [default: false]\\u001b[0m\\n\\u001b[0m      --url         URL for Fauna Core HTTP API requests made by the command. Defaults to https://db.fauna.com.  [string]\\u001b[0m\\n\\u001b[0m      --secret      Authentication secret for Fauna Core HTTP API requests made by the command. Mutually exclusive with `--database` and `--role`.  [string]\\u001b[0m\\n\\u001b[0m      --accountKey  Fauna account key used for authentication. Negates the need for a user login. The key is used to generate short-lived database secrets for the CLI. Mutually exclusive with `--user` and `--secret`.  [string]\\u001b[0m\\n\\u001b[0m  -d, --database    Path, including Region Group identifier and hierarchy, for the database to run the command in. Mutually exclusive with `--secret`.  [string]\\u001b[0m\\n\\u001b[0m  -r, --role        Role used to run the command. Mutually exclusive with `--secret`.  [string]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mOptions:\\u001b[0m\\n\\u001b[0m  -h, --help         Show help.  [boolean]\\u001b[0m\\n\\u001b[0m      --version      Show the fauna CLI version.  [boolean]\\u001b[0m\\n\\u001b[0m      --name         Name of the child database to create.  [string] [required]\\u001b[0m\\n\\u001b[0m      --typechecked  Enable typechecking for the database. Defaults to the typechecking setting of the parent database.  [boolean]\\u001b[0m\\n\\u001b[0m      --protected    Enable protected mode for the database. Protected mode disallows destructive schema changes.  [boolean]\\u001b[0m\\n\\u001b[0m      --priority     User-defined priority for the database.  [number]\\u001b[0m\\n\\u001b[0m\\u001b[0m\\n\\u001b[0mExamples:\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --database us/example                Create a database named \'my_database\' directly under \'us/example\'.\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --secret my-secret                   Create a database named \'my_database\' directly under the database scoped to a secret.\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --database us/example --typechecked  Create a database with typechecking enabled.\\u001b[0m\\n\\u001b[0m  fauna database create --name my_database --database us/example --protected    Create a database with protected mode enabled.\\u001b[0m\\n\\n\\u001b[31mUnknown command: \'imastring\'\\u001b[39m"' match("Invalid value for option typechecked: imastring")
    at Context.<anonymous> (file:///home/runner/work/fauna-shell/fauna-shell/test/database/create.mjs:48:42)