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
* adding mock services for search
* Feature/search (#51)
* fix malformed json
* add elasticsearch sync
* implement elasticsearch indexing
* update mock services and fetch member information
* elasticsearch projects list api
* update project lists tests
* fix lint errors
* fix minor errors
* update postman
* final fixes
* update test configuration
* some additional final fixes
* fixing analytics and project history
* adding support for aws-es, fixing bugs, refactoring
* fixing path
* fixing test script
* updating test es endpoint
* adding list endpoint along with es list
* missing files
* adding elasticsearch seed script
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