-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from TogetherCrew/153-update-community-schema…
…-to-support-role-based-permissions-in-upv1 153 update community schema to support role based permissions in upv1
- Loading branch information
Showing
12 changed files
with
209 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
// import mongoose from 'mongoose'; | ||
// import config from '../../src/config'; | ||
import mongoose from 'mongoose'; | ||
import config from '../../src/config'; | ||
|
||
// const setupTestDB = () => { | ||
// beforeAll(async () => { | ||
// mongoose.set('strictQuery', false); | ||
// await mongoose.connect(config.mongoose.serverURL); | ||
// }); | ||
const setupTestDB = () => { | ||
beforeAll(async () => { | ||
mongoose.set('strictQuery', false); | ||
await mongoose.connect(config.mongoose.serverURL); | ||
}); | ||
|
||
// beforeEach(async () => { | ||
// await Promise.all( | ||
// Object.values(mongoose.connection.collections).map(async (collection) => collection.deleteMany({})), | ||
// ); | ||
// }); | ||
beforeEach(async () => { | ||
await Promise.all( | ||
Object.values(mongoose.connection.collections).map(async (collection) => collection.deleteMany({})), | ||
); | ||
}); | ||
|
||
// afterAll(async () => { | ||
// await mongoose.disconnect(); | ||
// }); | ||
// }; | ||
afterAll(async () => { | ||
await mongoose.disconnect(); | ||
}); | ||
}; | ||
|
||
// export default setupTestDB; | ||
export default setupTestDB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
--- | ||
version: '3.9' | ||
version: "3.9" | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
target: test | ||
dockerfile: Dockerfile | ||
environment: | ||
- DB_HOST=mongo | ||
- DB_PORT=27017 | ||
- DB_USER=root | ||
- DB_PASSWORD=pass | ||
- DB_NAME=RnDAO | ||
volumes: | ||
- ./coverage:/project/coverage | ||
depends_on: | ||
mongo: | ||
condition: service_healthy | ||
mongo: | ||
image: "mongo:5.0.10" | ||
environment: | ||
- MONGO_INITDB_DATABASE=RnDAO | ||
- MONGO_INITDB_ROOT_USERNAME=root | ||
- MONGO_INITDB_ROOT_PASSWORD=pass | ||
healthcheck: | ||
test: echo 'db.stats().ok' | mongosh localhost:27017/test --quiet | ||
interval: 60s | ||
timeout: 10s | ||
retries: 2 | ||
start_period: 40s | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.