Commit ca64f80
Migrate tests to node:test and update CI (#273)
* Migrate tests to node:test and update CI
Replace Jest-based test setup with native node:test/assert and update CI. Tests were refactored to use node:test and node:assert (many __tests__ updated), new auth token unit tests added, and routes_mounted.test.js reworked to a data-driven style. The database mock was rewritten to remove Jest-specific APIs and provide a lightweight mock/registry with resetMocks; jest.config.js was removed. GitHub Actions workflows now separate install, test (npm run test:ci) and coverage (npm run coverage:ci) steps. package.json dev tooling and test scripts were adjusted accordingly, and test bootstrap/loader/coverage artifacts were added while placeholder .txt test files were removed.
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Delete coverage-inventory.json
* rebranch
* Update cd_dev.yaml
* Update cd_prod.yaml
* hotfix the search test
* Update structural validation + sync strategy in __tests__/openapi_sync_artifacts.test.js
* dedup test runs on prod
* Bug fixes and tests for critical functionality
* critical functionality tests
* These no longer need the create step for testing
* These no longer need the create step for testing
* Fix exclusion flag
* cleanup
* update start script to avoid dotenv dependency
* Line up contract. Add HEAD tests because contract requires them.
* load env
* last bit of cleanup and bolstering
* Coverage (#274)
* Add middleware for PATCH override support
Introduce createPatchOverrideMiddleware in rest.js to centralize validation of X-HTTP-Method-Override for POST-to-PATCH requests. Replace duplicated inline checks in routes/patchSet.js, routes/patchUnset.js, and routes/patchUpdate.js with the new middleware (each using a route-specific statusMessage). Also standardize error handling by ending 405 responses with res.status(405).end() and export the new middleware from rest.js.
* End 405 responses and add route wrapper tests
Replace patterns that set status and call next(res) with res.status(405).end() in route fallbacks (routes/query.js, routes/release.js, routes/search.js) to ensure the response is terminated immediately. Add route wrapper tests (routes/__tests__/route_wrappers.test.js) to validate method-override handling, unsupported-method fallbacks, client verify behavior, and API discovery. Include a test coverage inventory (test/coverage-inventory.json) to record current test/coverage state.
* End responses for unsupported-method handlers
Replace next(res) with res.status(405).end() in multiple route fallbacks to ensure responses are terminated immediately (bulkCreate, bulkUpdate, create, delete, history, id, overwrite, putUpdate, since). Update route wrapper tests to import additional routers, add helper asserting fallback behavior on specific paths, and add tests for static/index handlers. Update test coverage inventory to reflect the new/updated tests.
* Guard for bot checks. Stop releases from hanging on a tree error.
* Changes from review. Reduce wording locks in tests.
* last bit of cleanup from review
* Introduce ecosystem file and env-loader for RHEL (#276)
* Introduce ecosystem file and env-loader for RHEL
* Introduce ecosystem file and env-loader for RHEL
* changes from testing
* cmon RHEL
* back to 500M
* 100% coverage
* Changes during review
* test: lock down secret name and cp target in sync workflow tests
Adds two regex assertions to each sync-artifact test:
- secrets.OPENAPI must appear verbatim (catches a rename that would
silently break the receiver checkout step at runtime)
- the literal 'cp source target' line must point at the expected paths
(already covered for provider sync; now mirrored on shared sync)
Backports improvements developed during TinyNode's parallel sync test
where the same regression class actually bit us this week.
* chore: align RERUM sync workflows with TinyNode/TinyPen pattern
- bump peter-evans/create-pull-request v7 -> v8
- rename receiver checkout path rerum_openapi -> receiver
- add `add-paths`, explicit `base: main`, `ref: main` on receiver checkout
- add `test -f` verify-stub guard on both workflows (receiver stubs exist)
- branch naming automation/sync-rerum-* -> sync/rerum-*
- commit-message/title gain `chore:` prefix
- PR body now matches the bullet-list format used by TinyNode and TinyPen
- update tests to use `path:\s*receiver`, `@v\d+`, and new cp target regex
* Remove claude from authorship lines. Move contracts/ under openapi/contracts like other repos for consistency
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu>1 parent b4e7efd commit ca64f80
81 files changed
Lines changed: 3476 additions & 6225 deletions
File tree
- .github/workflows
- __tests__
- auth
- __tests__
- bin
- controllers
- database
- __mocks__
- openapi/contracts
- routes
- __tests__
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 6 | | |
19 | | - | |
20 | 7 | | |
21 | 8 | | |
22 | | - | |
| 9 | + | |
23 | 10 | | |
24 | 11 | | |
25 | 12 | | |
26 | | - | |
| 13 | + | |
27 | 14 | | |
28 | 15 | | |
29 | 16 | | |
30 | | - | |
| 17 | + | |
31 | 18 | | |
32 | 19 | | |
33 | 20 | | |
| |||
38 | 25 | | |
39 | 26 | | |
40 | 27 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
45 | 32 | | |
46 | 33 | | |
47 | 34 | | |
48 | | - | |
49 | 35 | | |
50 | 36 | | |
51 | 37 | | |
| |||
55 | 41 | | |
56 | 42 | | |
57 | 43 | | |
58 | | - | |
| 44 | + | |
59 | 45 | | |
60 | 46 | | |
61 | 47 | | |
| |||
70 | 56 | | |
71 | 57 | | |
72 | 58 | | |
73 | | - | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
| 8 | + | |
10 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | | - | |
16 | | - | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
25 | 28 | | |
26 | | - | |
| 29 | + | |
27 | 30 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | | - | |
33 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | | - | |
37 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | | - | |
40 | | - | |
| 47 | + | |
41 | 48 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 49 | + | |
46 | 50 | | |
47 | | - | |
48 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | | - | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | | - | |
37 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | | - | |
40 | | - | |
| 46 | + | |
41 | 47 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 48 | + | |
46 | 49 | | |
47 | | - | |
48 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments