Docs

zitadel policies test

Run the test cases in .zitadel/policies/ against the policies

Usage

npx @zitadel/cli@latest policies test [<operation>] [flags]

Arguments

ArgumentDescription
<operation>Test only this operation's policy, such as auth.factor.password.set.

Flags

FlagDescription
--release <value>Test the policies a release pins (rel_…) instead of the files in .zitadel/policies/.
-e, --env <value>Environment to run against, e.g. production. Defaults to ZITADEL_ENV, then the hosting platform's build (VERCEL_ENV, or Netlify's CONTEXT), then development.
--env-file <value>Read ZITADEL_* values from this file ahead of the process environment. A relative path is read from the current directory, not from --cwd. Cannot be combined with --env.

It also takes the global flags.

Examples

npx @zitadel/cli@latest policies test
npx @zitadel/cli@latest policies test auth.factor.password.set
npx @zitadel/cli@latest policies test --release rel_01KXB7C2M4N7F0N9WD3P2E4YM7
npx @zitadel/cli@latest policies test --json

Was this helpful?