Skip to content

Conversation

@kptdobe
Copy link
Contributor

@kptdobe kptdobe commented Dec 8, 2025

Run IT / smoke tests against da-admin-ci worker.

Tests combo:

  • npm run test - runs unit tests
  • npm run test:it (= local IT) - runs "smoke tests" against a "local" setup: da-admin worker running locally in wrangler, local S3 server and local IMS server)
  • npm run test:postdeploy (= postdeploy IT) - runs the same "smoke tests" against a ci deployed worker: da-admin-ci running in CF with da-content-stage content, DA_CONFIG_STAGE KV and IMS stage (coming soon, for now IMS prod)

"smoke tests" = a simple set of fetch requests validating basic api operations (check config, create folder, upload files, list folder...). First and last test of the suite is delete root folder to ensure each run starts on a fresh content structure even if a test fails.

The tests run against a predefined org (da-admin-ci-it-org) and repo name contains the current branch name (several branches can execute tests in parallel.

While the same suite is executed, there are few differences between "local IT" and "postdeploy IT":

  • "localIT"
    • all local servers have to be started
    • because local S3 is completely empty, a first test creates the config. Test runs only in this local mode. Of course, when we will not be able to write without authorization, this trick will not be enough.
  • "postdeploy IT"
    • env variables containing worker deployed version, test URL but also branch have to be provided
    • config is persisted in the DA_CONFIG_STAGE KV (and should only be changed if the test setup changes). Same config is used for all test executions.

For now, da-admin-ci is deployed a new version (version upload AND version deploy). So far, it does not matter, promoting the version (version deploy) would only be interessant on the prod worker (upload version, run tests, if they succeed, deploy the version).

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kptdobe kptdobe requested review from auniverseaway and tripodsan and removed request for tripodsan December 23, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants