## Description This reworks CI now that we have merged docs and website into a single deployment. ## Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [x] 💻 CI/Deployment - [ ] 🐹 Trivial/Minor ## Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * Fixes https://github.com/alcionai/corso/issues/1551 ## Test Plan <!-- How will this be tested prior to merging.--> - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
1.3 KiB
1.3 KiB
Running tests locally
Prerequisites
-
Set
CORSO_PASSPHRASEenvironment variableexport CORSO_PASSPHRASE=<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
You can find more information on how to get these values in our M365 docs.
export AZURE_CLIENT_ID=<id> export AZURE_CLIENT_SECRET=<secret> export AZURE_TENANT_ID=<tenant>
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_M365_TEST_USER_IDexport CORSO_M365_TEST_USER_ID="..."