Skip to content

Commit

Permalink
test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ofilangi committed Sep 25, 2024
1 parent 2a00e3a commit efd0111
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 41 deletions.
5 changes: 5 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
NUXT_URL_P2M2_API_PARSE="http://localhost:8080/p2m2tools/api/format/parse/"
NUXT_URL_P2M2_API_SNIF="http://localhost:8080/p2m2tools/api/format/sniffer"
NUXT_PATH_SHARE="./shareFile"
PGHOST="localhost"
PGPASSWORD="ep2m2"
PGUSER="ep2m2"
PGPORT="5432"
PGDATABASE="ep2m2db"
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ metabolomic target analyzes manager.
- Associated calibration curves

## Installation

### Manual installation

```bash
npm i
```

### Running tests

```bash
docker volume prune
## database and API
docker compose --env-file .env.test -f compose.dev.yaml up -d

rpm run test
```

### Docker compose (Recommended)
_Requirement_ : Docker Engine
1. Download release archive
Expand Down
8 changes: 6 additions & 2 deletions compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ services:
- "5432:5432"
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
env_file:
- ./secrets/pg.env
environment:
POSTGRES_PASSWORD: ${PGPASSWORD}
POSTGRES_USER: ${PGUSER}
POSTGRES_DB: ${PGDATABASE}
PGPORT: ${PGPORT}
PGHOST: ${PGHOST}

volumes:
shareFile:
Expand Down
19 changes: 1 addition & 18 deletions compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@
#
# SPDX-License-Identifier: MIT

services:
web:
build:
context: .
dockerfile: Dockerfile.test
container_name: ep2m2_web
ports:
- "80:3000"
volumes:
- shareFile:/shareFile
- /home/runner/work/EP2M2/EP2M2/test:/EP2M2/test
environment:
PGPASSWORD: ep2m2
PGUSER: ep2m2
PGPORT: 5432
PGDATABASE: ep2m2db


services:
api:
image: inraep2m2/service-p2m2tools-api:latest
container_name: p2m2ToolsApi
Expand Down
21 changes: 0 additions & 21 deletions test/server/tableClass.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,4 @@ describe("tableClass", async ()=>{
expect(await(new Table("unknow"))).toThrowError(/^unknow table doesn't exist$/);
});

// Define structure of compound table
const compound:{columnName:string, type:string, maxLength:number|null}[] = [
{columnName:"id", type:"integer", maxLength:null},
{columnName:"name", type:"character varying", maxLength:255},
{columnName:"url", type:"character varying", maxLength:255},
{columnName:"description", type:"text", maxLength:null},
{columnName:"archive_date", type:"timestamp with time zone",
maxLength:null},
];
const compTable = await (new Table("compound"));
const compHeader = compTable.header;

test("Check number of header without id", ()=>{
expect(compHeader.length).toBe(compound.length - 1);
});


test("getHearder", () => {

});

});

0 comments on commit efd0111

Please sign in to comment.