Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deployment to test API #227

Merged
merged 7 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading