Skip to content

Commit

Permalink
fix karma config to point to right prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Apr 28, 2020
1 parent 0e6f64c commit b46fcd5
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tasks/config/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { DllCompiler } from '../../src/optimize/dynamic_dll_plugin';

const TOTAL_CI_SHARDS = 4;
const ROOT = dirname(require.resolve('../../package.json'));
const buildNum = '9007199254740991';

module.exports = function(grunt) {
function pickBrowser() {
Expand Down Expand Up @@ -58,27 +59,27 @@ module.exports = function(grunt) {

...UiSharedDeps.jsDepFilenames.map(
chunkFilename =>
`http://localhost:5610/bundles/9007199254740991/kbn-ui-shared-deps/${chunkFilename}`
`http://localhost:5610/${buildNum}/bundles/kbn-ui-shared-deps/${chunkFilename}`
),
`http://localhost:5610/bundles/9007199254740991/kbn-ui-shared-deps/${UiSharedDeps.jsFilename}`,
`http://localhost:5610/${buildNum}/bundles/kbn-ui-shared-deps/${UiSharedDeps.jsFilename}`,

'http://localhost:5610/built_assets/dlls/vendors_runtime.bundle.dll.js',
`http://localhost:5610/${buildNum}/built_assets/dlls/vendors_runtime.bundle.dll.js`,
...DllCompiler.getRawDllConfig().chunks.map(
chunk => `http://localhost:5610/built_assets/dlls/vendors${chunk}.bundle.dll.js`
chunk => `http://localhost:5610/${buildNum}/built_assets/dlls/vendors${chunk}.bundle.dll.js`
),

shardNum === undefined
? `http://localhost:5610/bundles/tests.bundle.js`
: `http://localhost:5610/bundles/tests.bundle.js?shards=${TOTAL_CI_SHARDS}&shard_num=${shardNum}`,
? `http://localhost:5610/${buildNum}/bundles/tests.bundle.js`
: `http://localhost:5610/${buildNum}/bundles/tests.bundle.js?shards=${TOTAL_CI_SHARDS}&shard_num=${shardNum}`,

`http://localhost:5610/bundles/9007199254740991/kbn-ui-shared-deps/${UiSharedDeps.baseCssDistFilename}`,
`http://localhost:5610/${buildNum}/bundles/kbn-ui-shared-deps/${UiSharedDeps.baseCssDistFilename}`,
// this causes tilemap tests to fail, probably because the eui styles haven't been
// included in the karma harness a long some time, if ever
// `http://localhost:5610/bundles/kbn-ui-shared-deps/${UiSharedDeps.lightCssDistFilename}`,
...DllCompiler.getRawDllConfig().chunks.map(
chunk => `http://localhost:5610/built_assets/dlls/vendors${chunk}.style.dll.css`
chunk => `http://localhost:5610/${buildNum}/built_assets/dlls/vendors${chunk}.style.dll.css`
),
'http://localhost:5610/bundles/tests.style.css',
`http://localhost:5610/${buildNum}/bundles/tests.style.css`,
];
}

Expand Down Expand Up @@ -128,9 +129,9 @@ module.exports = function(grunt) {

proxies: {
'/tests/': 'http://localhost:5610/tests/',
'/bundles/': 'http://localhost:5610/bundles/',
'/built_assets/dlls/': 'http://localhost:5610/built_assets/dlls/',
'/test_bundle/': 'http://localhost:5610/test_bundle/',
[`/${buildNum}/bundles/`]: `http://localhost:5610/${buildNum}/bundles/`,
[`/${buildNum}/built_assets/dlls/`]: `http://localhost:5610/${buildNum}/built_assets/dlls/`,
},

client: {
Expand Down

0 comments on commit b46fcd5

Please sign in to comment.