From a15f7d5ceebe2aab00708357d61c2ac3f1b14384 Mon Sep 17 00:00:00 2001 From: Robert Timm Date: Wed, 2 Oct 2024 11:30:07 +0000 Subject: [PATCH] tests: make use of traefik proxy during tests --- deploy/docker-compose.yml | 1 + test/specs/repo/queryservice.ts | 8 ++++---- test/suites/docker-compose.override.yml | 11 +++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 1be603d13..af8609cd3 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -98,6 +98,7 @@ services: hard: 32768 volumes: - wdqs-data:/wdqs/data + # TODO: maybe we only need it for the updater? environment: WIKIBASE_CONCEPT_URI: https://${WIKIBASE_PUBLIC_HOST} healthcheck: diff --git a/test/specs/repo/queryservice.ts b/test/specs/repo/queryservice.ts index 8fc8ea91b..938c170d0 100644 --- a/test/specs/repo/queryservice.ts +++ b/test/specs/repo/queryservice.ts @@ -69,7 +69,7 @@ describe( 'QueryService', function () { const itemId = await WikibaseApi.createItem( getTestString( itemLabel ), data ); // query the item using wd: prefix - await QueryServiceUIPage.open( `SELECT * WHERE{ wd:${ itemId } ?p ?o }` ); + await QueryServiceUIPage.open( `SELECT * WHERE{ ?p ?o }` ); // wait for WDQS-updater // eslint-disable-next-line wdio/no-pause @@ -114,7 +114,7 @@ describe( 'QueryService', function () { ).resolves.toEqual( true ); // query the property using wdt: prefix - await QueryServiceUIPage.open( `SELECT * WHERE{ ?s wdt:${ propertyId } ?o }` ); + await QueryServiceUIPage.open( `SELECT * WHERE{ ?s ?o }` ); await QueryServiceUIPage.submit(); await QueryServiceUIPage.resultTable; @@ -146,7 +146,7 @@ describe( 'QueryService', function () { ).replace( /[()]/g, '' ); // Check it shows up after creation - await QueryServiceUIPage.open( `SELECT * WHERE{ wd:${ itemId } ?p ?o }` ); + await QueryServiceUIPage.open( `SELECT * WHERE{ ?p ?o }` ); // wait for WDQS-updater // eslint-disable-next-line wdio/no-pause @@ -172,7 +172,7 @@ describe( 'QueryService', function () { ); await $( '.oo-ui-flaggedElement-destructive button' ).click(); - await QueryServiceUIPage.open( `SELECT * WHERE{ wd:${ itemId } ?p ?o }` ); + await QueryServiceUIPage.open( `SELECT * WHERE{ ?p ?o }` ); // wait for WDQS-updater // eslint-disable-next-line wdio/no-pause diff --git a/test/suites/docker-compose.override.yml b/test/suites/docker-compose.override.yml index b4a970cb8..130ad5f73 100644 --- a/test/suites/docker-compose.override.yml +++ b/test/suites/docker-compose.override.yml @@ -24,9 +24,14 @@ services: wdqs: image: wikibase/wdqs + # TODO: maybe we only need it for the updater? + environment: + WIKIBASE_CONCEPT_URI: http://${WIKIBASE_PUBLIC_HOST} wdqs-updater: image: wikibase/wdqs + environment: + WIKIBASE_CONCEPT_URI: http://${WIKIBASE_PUBLIC_HOST} wdqs-proxy: image: wikibase/wdqs-proxy @@ -67,6 +72,12 @@ services: # http endpoint - "--entrypoints.web.address=:80" - "--entrypoints.web.asdefault" + networks: + default: + aliases: + - wikibase.example + - wdqs-frontend.example + - quickstatements.example volumes: wikibase-config: