Skip to content

Commit

Permalink
wip: fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rti committed Oct 2, 2024
1 parent 414f83d commit 1e11cf2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
6 changes: 3 additions & 3 deletions test/specs/repo/queryservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe( 'QueryService', function () {
// property value is set with correct rdf
await expect(
QueryServiceUIPage.resultIncludes(
`<${ testEnv.vars.WIKIBASE_CONCEPT_URI }/prop/direct/${ propertyId }>`,
`<${ testEnv.vars.WIKIBASE_URL }/prop/direct/${ propertyId }>`,
propertyValue
)
).resolves.toEqual( true );
Expand All @@ -122,7 +122,7 @@ describe( 'QueryService', function () {
// should be set only to the item
await expect(
QueryServiceUIPage.resultIncludes(
`<${ testEnv.vars.WIKIBASE_CONCEPT_URI }/entity/${ itemId }>`,
`<${ testEnv.vars.WIKIBASE_URL }/entity/${ itemId }>`,
propertyValue
)
).resolves.toEqual( true );
Expand Down Expand Up @@ -256,7 +256,7 @@ describe( 'QueryService', function () {

await QueryServiceUIPage.open( `SELECT (COUNT(*) AS ?count)
WHERE {
<${ testEnv.vars.WIKIBASE_CONCEPT_URI }/entity/${ itemId }> <${ testEnv.vars.WIKIBASE_URL }/prop/direct/${ propertyId }> "test-property" .
<${ testEnv.vars.WIKIBASE_URL }/entity/${ itemId }> <${ testEnv.vars.WIKIBASE_URL }/prop/direct/${ propertyId }> "test-property" .
}` );

// wait for WDQS-updater
Expand Down
19 changes: 13 additions & 6 deletions test/suites/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ services:

wdqs:
image: wikibase/wdqs
# TODO: remove as soon as #772 is merged
environment:
WIKIBASE_CONCEPT_URI: https://${WIKIBASE_PUBLIC_HOST}

wdqs-updater:
image: wikibase/wdqs
# TODO: remove as soon as #772 is merged
environment:
WIKIBASE_CONCEPT_URI: https://${WIKIBASE_PUBLIC_HOST}

wdqs-proxy:
image: wikibase/wdqs-proxy
Expand Down Expand Up @@ -60,6 +54,19 @@ services:
environment:
SE_NODE_MAX_SESSIONS: ${MAX_INSTANCES}
SE_VNC_NO_PASSWORD: 1
links:
- "traefik:wikibase.example"
- "traefik:wdqs-frontend.example"
- "traefik:quickstatements.example"

traefik:
command:
# Basic setup
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
# http endpoint
- "--entrypoints.web.address=:80"
- "--entrypoints.web.asdefault"

volumes:
wikibase-config:
26 changes: 14 additions & 12 deletions test/test-services.env
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# Any of these can be overridden locally in ../local.env

# == TEST SERVICES GLOBALS
WIKIBASE_PUBLIC_HOST=wikibase.example
WDQS_FRONTEND_PUBLIC_HOST=wdqs-frontend.example
QUICKSTATEMENTS_PUBLIC_HOST=quickstatements.example

# URLS
WIKIBASE_URL=http://wikibase
WIKIBASE_CONCEPT_URI=http://wikibase
MW_ADMIN_NAME=admin
MW_ADMIN_EMAIL=admin@wikibase.example
MW_ADMIN_PASS=change-this-password

# URLs used by tests to access services from within the
# docker network through traefik proxy
WIKIBASE_URL=http://wikibase.example
WDQS_FRONTEND_URL=http://wdqs-frontend.example
QUICKSTATEMENTS_URL=http://quickstatements.example

# URLs used by tests to access services from within the docker network directly
WIKIBASE_CLIENT_URL=http://wikibase-client
WDQS_URL=http://wdqs:9999
WDQS_FRONTEND_URL=http://wdqs-frontend
WDQS_PROXY_URL=http://wdqs-proxy
QUICKSTATEMENTS_URL=http://quickstatements

# For Reverse Proxy (traefik) service routing
WIKIBASE_PUBLIC_HOST=wikibase
WDQS_FRONTEND_PUBLIC_HOST=wdqs-frontend
QUICKSTATEMENTS_PUBLIC_HOST=quickstatements

# CONFIG

# wikibase / wikibase-client / wikibase-jobrunner
MW_SCRIPT_PATH=/w

0 comments on commit 1e11cf2

Please sign in to comment.