From 5f39d2875cd51320ef5107f7d950b7407498301b Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 19 Jul 2018 21:55:54 +0200 Subject: [PATCH] adapt tests to 0a0cddc --- test/db.js | 2 +- test/insa.js | 2 +- test/nahsh.js | 2 +- test/oebb.js | 2 +- test/throttle.js | 3 ++- test/vbb.js | 2 +- test/vbn.js | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/db.js b/test/db.js index 5448ccfd..2486a412 100644 --- a/test/db.js +++ b/test/db.js @@ -66,7 +66,7 @@ const assertValidPrice = (t, p) => { } const test = tapePromise(tape) -const client = createClient(dbProfile) +const client = createClient(dbProfile, 'public-transport/hafas-client:test') const berlinHbf = '8011160' const münchenHbf = '8000261' diff --git a/test/insa.js b/test/insa.js index 2a6fe169..90aee588 100644 --- a/test/insa.js +++ b/test/insa.js @@ -33,7 +33,7 @@ const cfg = { const validate = createValidate(cfg, {}) const test = tapePromise(tape) -const client = createClient(insaProfile) +const client = createClient(insaProfile, 'public-transport/hafas-client:test') const magdeburgHbf = '8010224' const magdeburgBuckau = '8013456' diff --git a/test/nahsh.js b/test/nahsh.js index 7ee8c050..f17c1c62 100644 --- a/test/nahsh.js +++ b/test/nahsh.js @@ -59,7 +59,7 @@ const assertValidPrice = (t, p) => { } const test = tapePromise(tape) -const client = createClient(nahshProfile) +const client = createClient(nahshProfile, 'public-transport/hafas-client:test') const kielHbf = '9049079' const flensburg = '9027253' diff --git a/test/oebb.js b/test/oebb.js index 3c8474a8..f383e6ba 100644 --- a/test/oebb.js +++ b/test/oebb.js @@ -50,7 +50,7 @@ const assertValidPrice = (t, p) => { } const test = tapePromise(tape) -const client = createClient(oebbProfile) +const client = createClient(oebbProfile, 'public-transport/hafas-client:test') const salzburgHbf = '8100002' const wienFickeystr = '911014' diff --git a/test/throttle.js b/test/throttle.js index cc849218..bbbdea87 100644 --- a/test/throttle.js +++ b/test/throttle.js @@ -5,6 +5,7 @@ const test = require('tape') const createThrottledClient = require('../throttle') const vbbProfile = require('../p/vbb') +const userAgent = 'public-transport/hafas-client:test' const spichernstr = '900000042101' test('throttle works', (t) => { @@ -15,7 +16,7 @@ test('throttle works', (t) => { } const mockProfile = Object.assign({}, vbbProfile, {transformReqBody}) - const client = createThrottledClient(mockProfile, 2, 1000) + const client = createThrottledClient(mockProfile, userAgent, 2, 1000) for (let i = 0; i < 10; i++) client.departures(spichernstr, {duration: 1}) t.plan(3) diff --git a/test/vbb.js b/test/vbb.js index cbda4065..9968fcd4 100644 --- a/test/vbb.js +++ b/test/vbb.js @@ -103,7 +103,7 @@ const validate = createValidate(cfg, { }) const test = tapePromise(tape) -const client = createClient(vbbProfile) +const client = createClient(vbbProfile, 'public-transport/hafas-client:test') const amrumerStr = '900000009101' const spichernstr = '900000042101' diff --git a/test/vbn.js b/test/vbn.js index f4c65e2f..241e442a 100644 --- a/test/vbn.js +++ b/test/vbn.js @@ -30,7 +30,7 @@ const cfg = { const validate = createValidate(cfg, {}) const test = tapePromise(tape) -const client = createClient(vbnProfile) +const client = createClient(vbnProfile, 'public-transport/hafas-client:test') const bremenHbf = '8000050' const bremerhavenHbf = '8000051'