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
There is a helper script to sync the indices and mappings with the elasticsearch.
36
+
37
+
Run `npm run elasticsearch:sync` from the root of project to execute the script.
38
+
39
+
> NOTE: This will first clear all the indices and than recreate them. So use with caution.
34
40
35
41
**NOTE**: In production these dependencies / services are hosted & managed outside tc-projects-service.
36
42
43
+
### Test
44
+
45
+
Each of the individual modules/services are unit tested.
46
+
47
+
To run unit tests run `npm run test` from root of project.
48
+
49
+
While tests are being executed the `NODE_ENV` environment variable has a value `test` and `config/test.js` configuration is loaded. The default test configuration refers to `projectsdb_test` postgres database. So make sure that this database exists before running the tests. Since we are using docker-compose for local deployment change `local/docker-compose.yaml` postgres service with updated database name and re-create the containers.
50
+
51
+
```
52
+
// stop already executing containers if any
53
+
docker-compose stop -t 1
54
+
// clear the containers
55
+
docker-compose rm -f
56
+
// re-run the services with build flag
57
+
docker-compose up --build
58
+
```
59
+
37
60
#### JWT Authentication
38
61
Authentication is handled via Authorization (Bearer) token header field. Token is a JWT token. Here is a sample token that is valid for a very long time for a user with administrator role.
0 commit comments