Skip to content

Commit

Permalink
tests: make use of traefik proxy during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rti committed Oct 2, 2024
1 parent 1e11cf2 commit a15f7d5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions test/specs/repo/queryservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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{ <http://wikibase.example/entity/${ itemId }> ?p ?o }` );

// wait for WDQS-updater
// eslint-disable-next-line wdio/no-pause
Expand Down Expand Up @@ -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 <http://wikibase.example/prop/direct/${ propertyId }> ?o }` );

await QueryServiceUIPage.submit();
await QueryServiceUIPage.resultTable;
Expand Down Expand Up @@ -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{ <http://wikibase.example/entity/${ itemId }> ?p ?o }` );

// wait for WDQS-updater
// eslint-disable-next-line wdio/no-pause
Expand All @@ -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{ <http://wikibase.example/entity/${ itemId }> ?p ?o }` );

// wait for WDQS-updater
// eslint-disable-next-line wdio/no-pause
Expand Down
11 changes: 11 additions & 0 deletions test/suites/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

0 comments on commit a15f7d5

Please sign in to comment.