Skip to content

Commit

Permalink
Add test_be_next service with different env for jobs testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sofyalaski authored Jun 26, 2024
1 parent f57aedb commit b84cf0e
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 4 deletions.
17 changes: 17 additions & 0 deletions dev/config/test_backend_next/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MONGODB_URI=mongodb://mongodb:27017/test_be_next
PID_PREFIX="API_testing"
ADMIN_GROUPS="admin,adminingestor"
DELETE_GROUPS="archivemanager"
CREATE_DATASET_GROUPS=group1,group2,group3
CREATE_DATASET_WITH_PID_GROUPS="group2"
CREATE_DATASET_PRIVILEGED_GROUPS="datasetingestor,group3"
CREATE_JOB_GROUPS=group1,group2
UPDATE_JOB_GROUPS=group1
DELETE_JOB_GROUPS="archivemanager"
PROPOSAL_GROUPS="proposalingestor"
SAMPLE_PRIVILEGED_GROUPS="sampleingestor"
SAMPLE_GROUPS="group1"
MONGODB_COLLECTION=Dataset
STACK_VERSION=8.8.2
MEM_LIMIT=4G
JOB_CONFIGURATION_FILE="test/config/jobconfig.json"
87 changes: 87 additions & 0 deletions dev/config/test_backend_next/jobconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"configVersion": "v1.0 2024-03-01 6f3f38",
"jobs": [
{
"jobType": "all_access",
"configVersion": "v1.0 2024-03-01 6f3f38",
"create": {
"auth": "#all",
"actions": [
{
"actionType": "log"
},
{
"actionType": "url",
"url": "http://localhost:3000/api/v3/health?jobid={{id}}",
"headers": {
"accept": "application/json"
}
}
]
},
"statusUpdate": {
"auth": "#all"
}
},
{
"jobType": "public_access",
"configVersion": "v1.0 2024-03-01 6f3f31",
"create": {
"auth": "#datasetPublic"
},
"statusUpdate": {
"auth": "#all"
}
},
{
"jobType": "authenticated_access",
"configVersion": "v1.0 2024-03-01 6f3f32",
"create": {
"auth": "#authenticated"
},
"statusUpdate": {
"auth": "#all"
}
},
{
"jobType": "dataset_access",
"configVersion": "v1.0 2024-03-01 6f3f33",
"create": {
"auth": "#datasetAccess"
},
"statusUpdate": {
"auth": "#jobOwnerGroup"
}
},
{
"jobType": "owner_access",
"configVersion": "v1.0 2024-03-01 6f3f34",
"create": {
"auth": "#datasetOwner"
},
"statusUpdate": {
"auth": "#jobOwnerUser"
}
},
{
"jobType": "user_access",
"configVersion": "v1.0 2024-03-01 6f3f35",
"create": {
"auth": "user5.1"
},
"statusUpdate": {
"auth": "user5.1"
}
},
{
"jobType": "group_access",
"configVersion": "v1.0 2024-03-01 6f3f36",
"create": {
"auth": "@group5"
},
"statusUpdate": {
"auth": "@group5"
}
}
]
}
24 changes: 20 additions & 4 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
profiles:
- be
- be_next
- test_be_next
- oi

mongodb_seed:
Expand Down Expand Up @@ -77,21 +78,36 @@ services:
profiles:
- fe

be_next:
be_next_base:
build:
context: ../scicat-backend-next/.
target: dev
depends_on:
- mongodb
ports:
- 3000:3000
volumes:
- ../scicat-backend-next:/home/node/app
- /home/node/app/node_modules
- /home/node/app/dist
- ../scicat-backend-next/functionalAccounts.json.minimal.example:home/node/app/functionalAccounts.json
- ../scicat-backend-next/functionalAccounts.json.test:/home/node/app/functionalAccounts.json
env_file: ./config/backend_next/.env
command: /bin/sh -c "while true; do sleep 600; done"
profiles:
- never

test_be_next:
extends: be_next_base
depends_on:
- mongodb
volumes:
- ./config/test_backend_next/jobconfig.json:/home/node/app/test/config/jobconfig.json
env_file: ./config/test_backend_next/.env
profiles:
- test_be_next

be_next:
extends: be_next_base
depends_on:
- mongodb
profiles:
- be_next

Expand Down

0 comments on commit b84cf0e

Please sign in to comment.