Skip to content

Commit

Permalink
Merge bd8e32e into 51bc5dd
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp authored Jan 29, 2025
2 parents 51bc5dd + bd8e32e commit 91d4e06
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
integration:
needs: unit
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 10
env:
HTTP_BIN_HOST: http://localhost:8080
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: docker run -d -p8080:80 kennethreitz/httpbin
- run: npm run docker:start
- run: npm install
- run: npm run integration
performance:
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
"flame": "0x -o -- node --expose-gc test/performance.mjs",
"performance": "rm -rf output && abap_transpile ./abap_transpile_test.json && node --expose-gc test/performance.mjs",
"integration": "rm -rf output && abap_transpile ./abap_transpile_test.json && node --expose-gc output/index.mjs",
"docker:start": "docker compose -p open-abap -f test/stack.yml up -d --wait",
"test": "npm run lint && npm run unit"
},
"license": "MIT",
"dependencies": {
"@abaplint/cli": "^2.113.91",
"@abaplint/cli": "^2.113.99",
"@abaplint/database-pg": "^2.10.20",
"@abaplint/database-sqlite": "^2.10.20",
"@abaplint/runtime": "^2.10.23",
"@abaplint/transpiler-cli": "^2.10.23",
Expand Down
12 changes: 12 additions & 0 deletions test/adbc/cl_sql_statement.clas.testclasses.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CLASS ltcl_test DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION MEDIUM FINAL.

PRIVATE SECTION.
METHODS test FOR TESTING RAISING cx_static_check.

ENDCLASS.

CLASS ltcl_test IMPLEMENTATION.
METHOD test.
RETURN. " todo, implement method
ENDMETHOD.
ENDCLASS.
9 changes: 9 additions & 0 deletions test/setup.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import {SQLiteDatabaseClient} from "@abaplint/database-sqlite";
import {PostgresDatabaseClient} from "@abaplint/database-pg";

export async function setup(abap, schemas, insert) {
abap.context.databaseConnections["DEFAULT"] = new SQLiteDatabaseClient();
await abap.context.databaseConnections["DEFAULT"].connect();
await abap.context.databaseConnections["DEFAULT"].execute(schemas.sqlite);
await abap.context.databaseConnections["DEFAULT"].execute(insert);

abap.context.databaseConnections["PG"] = new PostgresDatabaseClient({
user: "postgres",
host: "localhost",
database: "postgres",
password: "postgres",
port: 5432,
});
}
21 changes: 21 additions & 0 deletions test/stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
services:
postgresql:
image: postgres:17
container_name: postgresql
restart: always
environment:
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 20s
retries: 5
tmpfs:
- /var/lib/postgresql/data
httpbin:
image: kennethreitz/httpbin
container_name: httpbin
ports:
- '80:8080'

0 comments on commit 91d4e06

Please sign in to comment.