Skip to content

Commit c63bfee

Browse files
reorganize tests
1 parent 96e82f2 commit c63bfee

File tree

6 files changed

+20
-21
lines changed

6 files changed

+20
-21
lines changed
File renamed without changes.

.github/workflows/test.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,19 @@ jobs:
5353
run: yarn install --frozen-lockfile
5454

5555
- name: Start Cloudserver with MongoDB backend
56-
run: docker compose -f docker-compose.cloudserver-mongo.yml up -d
56+
run: docker compose -f .github/docker-compose.cloudserver-mongo.yml up -d
5757

5858
- name: Wait for Cloudserver to be ready
5959
run: |
6060
set -o pipefail
61-
bash .github/workflows/wait_for_local_port.bash 8000 40
61+
bash .github/scripts/wait_for_local_port.bash 8000 40
6262
63-
- name: Run indexes apis tests
64-
run: yarn test tests/testIndexesApis.test.ts
65-
- name: Run error handling tests
66-
run: yarn test tests/testErrorHandling.test.ts
67-
- name: Run multiple backend apis tests
68-
run: yarn test tests/testMultipleBackendApis.test.ts
63+
- name: Run MongoDB backend tests
64+
run: yarn test:mongo-backend
6965

7066
- name: Stop Cloudserver
7167
if: always()
72-
run: docker compose -f docker-compose.cloudserver-mongo.yml down
68+
run: docker compose -f .github/docker-compose.cloudserver-mongo.yml down
7369

7470
test-metadata-backend:
7571
name: Test with Scality metadata backend
@@ -100,27 +96,21 @@ jobs:
10096
password: ${{ github.token }}
10197

10298
- name: Start Cloudserver with Scality metadata backend
103-
run: docker compose -f docker-compose.cloudserver-metadata.yml up -d
99+
run: docker compose -f .github/docker-compose.cloudserver-metadata.yml up -d
104100

105101
- name: Wait for metadata to be ready
106102
run: |
107103
set -o pipefail
108-
bash .github/workflows/wait_for_local_port.bash 9000 40
104+
bash .github/scripts/wait_for_local_port.bash 9000 40
109105
110106
- name: Wait for Cloudserver to be ready
111107
run: |
112108
set -o pipefail
113-
bash .github/workflows/wait_for_local_port.bash 8000 60
109+
bash .github/scripts/wait_for_local_port.bash 8000 60
114110
115-
- name: Run general apis tests
116-
run: yarn test tests/testApis.test.ts
117-
- name: Run lifecycle apis tests
118-
run: yarn test tests/testLifecycleApis.test.ts
119-
- name: Run metadata apis tests
120-
run: yarn test tests/testMetadataApis.test.ts
121-
- name: Run raft apis tests
122-
run: yarn test tests/testRaftApis.test.ts
111+
- name: Run metadata backend tests
112+
run: yarn test:metadata-backend
123113

124114
- name: Stop Cloudserver
125115
if: always()
126-
run: docker compose -f docker-compose.cloudserver-metadata.yml down
116+
run: docker compose -f .github/docker-compose.cloudserver-metadata.yml down

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
"build:wrapper": "tsc",
1919
"build": "yarn install && yarn clean:build && yarn build:smithy && yarn build:generated && yarn build:wrapper",
2020
"test": "jest",
21+
"test:indexes": "jest tests/testIndexesApis.test.ts",
22+
"test:error-handling": "jest tests/testErrorHandling.test.ts",
23+
"test:multiple-backend": "jest tests/testMultipleBackendApis.test.ts",
24+
"test:general": "jest tests/testApis.test.ts",
25+
"test:lifecycle": "jest tests/testLifecycleApis.test.ts",
26+
"test:metadata": "jest tests/testMetadataApis.test.ts",
27+
"test:raft": "jest tests/testRaftApis.test.ts",
28+
"test:mongo-backend": "yarn test:indexes && yarn test:error-handling && yarn test:multiple-backend",
29+
"test:metadata-backend": "yarn test:general && yarn test:lifecycle && yarn test:metadata && yarn test:raft",
2130
"lint": "eslint . --ext .ts,.tsx",
2231
"typecheck": "tsc --noEmit"
2332
},

0 commit comments

Comments
 (0)