You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- FILE_UPLOAD_SIZE_LIMIT: the file upload size limit in bytes
41
-
-CHALLENGES_API_URL: TC challenges API base URL
41
+
-RESOURCES_API_URL: TC resources API base URL
42
42
- GROUPS_API_URL: TC groups API base URL
43
+
- PROJECTS_API_URL: TC projects API base URL
43
44
- COPILOT_RESOURCE_ROLE_IDS: copilot resource role ids allowed to upload attachment
44
45
- HEALTH_CHECK_TIMEOUT: health check timeout in milliseconds
45
46
- SCOPES: the configurable M2M token scopes, refer `config/default.js` for more details
@@ -76,6 +77,7 @@ It starts Elasticsearch, DynamoDB and S3 compatible server.
76
77
77
78
## Mock api
78
79
For postman verification, please use the mock api under mock-api folder. It provides mock endpoint to fetch challenge resources and groups.
80
+
You need to ensure DynamoDB configuration in `mock-api/config/default.js` is consistent with `config/default.js`
79
81
Go to `mock-api` folder and run command `npm run start` to start the mock-api listening on port 4000
80
82
81
83
## Create Tables
@@ -90,6 +92,7 @@ Go to `mock-api` folder and run command `npm run start` to start the mock-api li
90
92
4. Initialize/Clear database in default environment: `npm run init-db`
91
93
5. View table data in default environment: `npm run view-data <ModelName>`, ModelName can be `Challenge`, `ChallengeType`, `ChallengeSetting`, `AuditLog`, `Phase`, `TimelineTemplate`or `Attachment`
92
94
6. Create Elasticsearch index: `npm run init-db`, or to re-create index: `npm run init-db force`
95
+
7. Synchronize ES data and DynamoDB data: `npm run sync-es`
93
96
94
97
### Notes
95
98
- The seed data are located in `src/scripts/seed`
@@ -115,6 +118,7 @@ Go to `mock-api` folder and run command `npm run start` to start the mock-api li
115
118
- Create DynamoDB tables.
116
119
- Initialize ES index.
117
120
- Various config parameters should be properly set.
Copy file name to clipboardExpand all lines: Verification.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# TopCoder Challenge API Verification
2
2
3
3
## Postman tests
4
+
- clear the environment, run command `npm run init-db` and `npm run init-es force`
4
5
- import Postman collection and environment in the docs folder to Postman
5
6
- run tests from up to down in order
7
+
- You need to run command `npm run sync-es` before you run `Challenges/get challenge` and `Challenges/search challenge` test case.
6
8
7
9
## DynamoDB Verification
8
10
Run command `npm run view-data <ModelName>` to view table data, ModelName can be `Challenge`, `ChallengeType`, `ChallengeSetting`, `AuditLog`, `Phase`, `TimelineTemplate`or `Attachment`
0 commit comments