* Clean up tree structure and add proper logo * Proper logo files * Initial docs * Pick up new page after merging main * Apply suggestions from code review Some nits Co-authored-by: Niraj Tolia <ntolia@users.noreply.github.com> * Quash a bunch of Vale prose linter errors, warnings, and suggestions. * PR Review feedback * Simplified mount folders * Cleaned up windows container * Hid `latest` release tag * Review feedback: Link to repo page * Better arrow symbol Co-authored-by: Niraj Tolia <ntolia@users.noreply.github.com> * Clarify sentence * Update README.md * Reframing focus to M365 * More linting * Use only MD files Co-authored-by: Niraj Tolia <ntolia@users.noreply.github.com>
1.2 KiB
1.2 KiB
Running tests locally
Prerequisites
-
Set
CORSO_PASSWORDenvironment variableexport CORSO_PASSWORD=<some password> -
Set AWS credential (needed for tests that use S3) environment variables
export AWS_ACCESS_KEY_ID="...." export AWS_SECRET_ACCESS_KEY="..." export AWS_SESSION_TOKEN="..." -
Create a config file with the S3 bucket used for testing
bucket = '<bucket name>' -
Set
CORSO_TEST_CONFIG_FILEto use the test config fileexport CORSO_TEST_CONFIG_FILE=~/.corso_test.toml -
Set M365 Credentials environment variables
export TENANT_ID=<tenant> export CLIENT_ID=<id> export CLIENT_SECRET=<secret>
Running tests
Standard go test ./... will run unit tests
Integration style tests run when enabled by setting the appropriate environment variable.
For example, CORSO_CI_TESTS=true go test ./...
The complete list of environment constants is available at
.../src/internal/tester/integration_runners.go.
Advanced options
-
To override the M365 user for tests, use
CORSO_M356_TEST_USER_IDexport CORSO_M356_TEST_USER_ID="..."