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
Also properly configure AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, ATTACHMENT_S3_BUCKET, IS_LOCAL_DB config parameters.
47
49
48
-
Also properly configure AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, ATTACHMENT_S3_BUCKET config parameters.
49
-
50
+
## DynamoDB Setup
51
+
We can use DynamoDB setup on Docker for testing purpose. Just run `docker-compose up` in `local` folder.
52
+
You can also use your own AWS DynamoDB service for testing purpose.
50
53
51
-
## DynamoDB Setup with Docker
52
-
We will use DynamoDB setup on Docker.
53
-
Note that you may need to modify regions in `local/init-dynamodb.sh` and `local/config`.
54
+
## AWS S3 Setup
55
+
Go to https://console.aws.amazon.com/ and login. Choose S3 from Service folder and click `Create bucket`. Following the instruction to create S3 bucket.
54
56
55
-
Just run `docker-compose up` in local folder
57
+
## Mock api
58
+
For postman verification, please use the mock api under mock-api folder. It provides mock endpoint to fetch challenge resources and groups.
59
+
Go to `mock-api` folder and run command `npm run start` to start the mock-api listening on port 4000
56
60
57
-
If you have already installed aws-cli in your local machine, you can execute `./local/init-dynamodb.sh` to
58
-
create the table. If not you can still create table following `Create Table via awscli in Docker`.
59
-
60
-
## Create Table via awscli in Docker
61
+
## Create Tables
61
62
1. Make sure DynamoDB are running as per instructions above.
62
-
63
-
2. Run the following commands
64
-
```
65
-
docker exec -ti dynamodb sh
66
-
```
67
-
Next
68
-
```
69
-
./init-dynamodb.sh
70
-
```
71
-
72
-
3. Now the tables have been created, you can use following command to verify
2. Make sure you have configured all config parameters. Refer [Configuration](#configuration)
64
+
3. Run `npm run create-tables` to create tables.
82
65
83
66
## Scripts
84
67
1. Drop/delete tables: `npm run drop-tables`
85
68
2. Creating tables: `npm run create-tables`
86
69
3. Seed/Insert data to tables: `npm run seed-tables`
70
+
4. Initialize database in default environment: `npm run init-db`
71
+
5. View table data in default environment: `npm run view-data <ModelName>`, ModelName can be `Challenge`, `ChallengeType`, `ChallengeSetting`, `AuditLog`, `Phase`, `TimelineTemplate`or `Attachment`
Copy file name to clipboardExpand all lines: Verification.md
+1-12Lines changed: 1 addition & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,7 @@
5
5
- run tests from up to down in order
6
6
7
7
## DynamoDB Verification
8
-
1. Open a new console and run the command `docker exec -ti dynamodb sh` to use `aws-cli`
9
-
10
-
2. On the console you opened in step 1, run these following commands you can verify the data that inserted into database during the executing of postman tests
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