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
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The following parameters can be set in config files or in env variables:
26
26
- DMZ_BUCKET: the DMZ bucket
27
27
- CLEAN_BUCKET: the clean bucket
28
28
- QUARANTINE_BUCKET: quarantine bucket
29
-
-REVIEW_API_URL: the review API URL
29
+
-SUBMISSION_API_URL: Submission API URL
30
30
- ANTIVIRUS_API_URL: Antivirus API URL
31
31
32
32
Note that ACCESS_KEY_ID and SECRET_ACCESS_KEY are optional,
@@ -72,9 +72,8 @@ Also note that there is a `/health` endpoint that checks for the health of the a
72
72
- install dependencies `npm i`
73
73
- run code lint check `npm run lint`, running `npm run lint:fix` can fix some lint errors if any
74
74
- start app `npm start`
75
-
- use another terminal to start mock review api `npm run mock-review-api`
76
-
the mock review api is running at `http://localhost:5000`
77
-
-**You can also run the application and mock review API together by executing the command `npm run docker-start`**
75
+
- use another terminal to start mock submission api `npm run mock-submission-api`
76
+
the mock submission api is running at `http://localhost:3010/api/v5`
78
77
79
78
- Anti virus API configured using `ANTIVIRUS_API_URL` should be up and running for the application to work properly.
80
79
@@ -102,7 +101,7 @@ docker-compose up
102
101
103
102
Ideally, Unit tests should use mocks for all external interactions. In AWS S3 mocks available, there is no option available to return different files based on some conditions, Also for Anti Virus API, there is no identifier to differentiate between good file and infected file to return mock responses.
104
103
105
-
Hence for unit tests, S3 and Anti virus API should be real and Review API will be mocked.
104
+
Hence for unit tests, S3 and Anti virus API should be real and Submission API will be mocked.
106
105
107
106
Tests uses separate S3 buckets which need to be configured using the environment variables
108
107
@@ -144,7 +143,7 @@ npm run cov-e2e
144
143
145
144
## Verification
146
145
147
-
- start kafka server, start mock review api, setup 3 AWS S3 buckets and update corresponding config, start processor app, start Anti virus service or configure Remote Anti virus service
146
+
- start kafka server, start mock submission api, setup 3 AWS S3 buckets and update corresponding config, start processor app, start Anti virus service or configure Remote Anti virus service
148
147
- use the above kafka-console-producer to write messages to `submission.notification.create` topic, one message per line:
149
148
150
149
```
@@ -156,5 +155,5 @@ npm run cov-e2e
156
155
157
156
similarly add more messages, the files will be moved to clean or quarantine areas depending on the result from Anti virus API
158
157
- go to AWS console S3 service, check the 3 buckets contents
159
-
- check the mock review api console, it should say getting some review data
158
+
- check the mock submission api console, it should say Mock Submission API got some data
0 commit comments