xprin supports an optional global configuration file to specify dependencies, repositories, and subcommand settings.
- Default:
~/.config/xprin.yaml - Custom: Use
-cflag to specify a different location
xprin -c /path/to/yourconfig.yaml test tests/Required map of dependency names to binary paths:
dependencies:
crossplane: /usr/local/bin/crossplane # Absolute path- The only supported dependency currently is
crossplane. - The value of a dependency can be either an absolute path or just the command name that is in
$PATH.
Optional map of repository names to local paths:
repositories:
myclaims: /path/to/repos/myclaims
mycompositions: /path/to/repos/mycompositionsRepository keys must match either:
- Directory name
- Directory name with
.gitsuffix - Remote URL
Used for resolving template variables in test suite files, for example {{ .Repositories.myclaims }}.
Optional map defining render and validate subcommands:
subcommands:
render: render --include-full-xr
validate: beta validate --error-on-missing-schemasThis allows compatibility with different Crossplane CLI versions.
dependencies:
crossplane: /usr/local/bin/crossplane
repositories:
myclaims: /path/to/repos/myclaims
mycompositions: /path/to/repos/mycompositions
subcommands:
render: render --include-full-xr
validate: beta validate --error-on-missing-schemasCheck your configuration:
# Display current configuration
xprin config
# Validate configuration and dependencies
xprin check
# Or use the config command (equivalent)
xprin config --checkBoth xprin check and xprin config --check verify that:
- All dependencies are found and executable
- All repositories exist and are accessible
- Configuration syntax is valid
Next Steps:
- Continue to Getting Started to run your first test