Mholloway has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/402416 )
Change subject: Update tests to allow for testing arbitrary RESTBase
installations
..
Update tests to allow for testing arbitrary RESTBase installations
Updates a couple of tests so that they don't test for WMF production
REST API URLs. Useful for testing a local RESTBase.
Change-Id: I89139a1115475dfb16870e84745e93796c3bc31b
---
M config.dev.yaml
M test/features/featured/pagecontent.js
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps
refs/changes/16/402416/1
diff --git a/config.dev.yaml b/config.dev.yaml
index 3b0d891..1b9f9bf 100644
--- a/config.dev.yaml
+++ b/config.dev.yaml
@@ -71,7 +71,7 @@
# the template used for contacting RESTBase
restbase_req:
method: '{{request.method}}'
-uri: https://{{domain}}/api/rest_v1/{+path}
+uri: http://localhost:7231/{{domain}}/v1/{+path}
query: '{{ default(request.query, {}) }}'
headers: '{{request.headers}}'
body: '{{request.body}}'
diff --git a/test/features/featured/pagecontent.js
b/test/features/featured/pagecontent.js
index 2c342c2..17c3fc7 100644
--- a/test/features/featured/pagecontent.js
+++ b/test/features/featured/pagecontent.js
@@ -30,7 +30,7 @@
return preq.get({ uri:
`${server.config.uri}en.wikipedia.org/v1/page/featured/2016/04/15` })
.then((res) => {
assert.status(res, 200);
-assert.equal(res.body.$merge,
'https://en.wikipedia.org/api/rest_v1/page/summary/Cosmic_Stories_and_Stirring_Science_Stories');
+assert.contains(res.body.$merge[0],
'v1/page/summary/Cosmic_Stories_and_Stirring_Science_Stories');
});
});
@@ -38,7 +38,7 @@
return preq.get({ uri:
`${server.config.uri}en.wikipedia.org/v1/page/featured/2016/04/29` })
.then((res) => {
assert.status(res, 200);
-assert.equal(res.body.$merge,
'https://en.wikipedia.org/api/rest_v1/page/summary/Lightning_(Final_Fantasy)');
+assert.contains(res.body.$merge[0],
'v1/page/summary/Lightning_(Final_Fantasy)');
});
});
--
To view, visit https://gerrit.wikimedia.org/r/402416
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I89139a1115475dfb16870e84745e93796c3bc31b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits