From a5f0881e3850a0f6d4caad8ec79edb7279a2916b Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 19 Feb 2019 22:17:40 -0500 Subject: [PATCH] gitlab-ci: enable postgres Signed-off-by: Jean Privat --- .gitlab-ci.yml | 1 + lib/postgresql/postgres.nit | 2 +- tests/gitlab_ci.skip | 1 - tests/test_postgres_native.nit | 2 +- tests/test_postgres_nity.nit | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 151fc5d..fdad845 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: nitlang/nit-ci services: - mongo + - postgres cache: paths: diff --git a/lib/postgresql/postgres.nit b/lib/postgresql/postgres.nit index d8a475e..6c209ef 100644 --- a/lib/postgresql/postgres.nit +++ b/lib/postgresql/postgres.nit @@ -37,7 +37,7 @@ # animals.add(turtle) # # var db_suffix = "NIT_TESTING_ID".environ -# var db = new Postgres.open("dbname=postgres") +# var db = new Postgres.open("host=postgres user=postgres dbname=postgres") # # assert db_is_open: not db.is_closed # assert create_table: db.create_table("IF NOT EXISTS animals_{db_suffix} (aname TEXT PRIMARY KEY, kind TEXT NOT NULL, age INT NOT NULL)") else print db.error diff --git a/tests/gitlab_ci.skip b/tests/gitlab_ci.skip index bbc9103..376b9da 100644 --- a/tests/gitlab_ci.skip +++ b/tests/gitlab_ci.skip @@ -5,7 +5,6 @@ glsl mpi neo objc -postgres action_nitro asteronits wiringPi diff --git a/tests/test_postgres_native.nit b/tests/test_postgres_native.nit index b7c5a49..d718469 100644 --- a/tests/test_postgres_native.nit +++ b/tests/test_postgres_native.nit @@ -19,7 +19,7 @@ module test_postgres_native import postgresql::native_postgres var db_suffix = "NIT_TESTING_ID".environ -var db = new NativePostgres.connectdb("dbname=postgres") +var db = new NativePostgres.connectdb("host=postgres user=postgres dbname=postgres") assert postgres_open: db.status.is_ok else print_error db.error var result = db.exec("CREATE TABLE IF NOT EXISTS animals_{db_suffix} (aname TEXT PRIMARY KEY, class TEXT NOT NULL, sex INTEGER)") diff --git a/tests/test_postgres_nity.nit b/tests/test_postgres_nity.nit index 4421a02..6714a04 100644 --- a/tests/test_postgres_nity.nit +++ b/tests/test_postgres_nity.nit @@ -19,7 +19,7 @@ module test_postgres_nity import postgresql::postgres var db_suffix = "NIT_TESTING_ID".environ -var db = new Postgres.open("dbname=postgres") +var db = new Postgres.open("host=postgres user=postgres dbname=postgres") assert open_db: not db.is_closed else print db.error assert create_table: db.create_table("IF NOT EXISTS users_{db_suffix} (uname TEXT PRIMARY KEY, pass TEXT NOT NULL, activated INTEGER, perc FLOAT)") else -- 1.7.9.5