mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
remove tests completely to avoid outdated snapshot errors
This commit is contained in:
parent
7d9becec72
commit
40fc31de46
14 changed files with 0 additions and 414 deletions
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"name": "kibana",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@elastic/foo": "link:packages/foo",
|
||||
"@elastic/baz": "link:packages/baz"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
},
|
||||
"scripts": {
|
||||
"build": "echo 'should not be called'; false"
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"name": "@elastic/bar",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "./target/index.js",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/preset-env": "^7.3.4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "babel --presets=@babel/preset-env --out-dir target src"
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
export default function(val) {
|
||||
return `test second: ${_.upperCase(val)}`;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"name": "@elastic/baz",
|
||||
"version": "1.0.0",
|
||||
"main": "./index.js"
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
console.log('@elastic/baz');
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"name": "@elastic/baz",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "./code.js",
|
||||
"dependencies": {
|
||||
"@elastic/quux": "link:../quux",
|
||||
"noop3": "999.999.999"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shx": "^0.2.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "shx cp code.js build/index.js"
|
||||
},
|
||||
"kibana": {
|
||||
"build": {
|
||||
"intermediateBuildDirectory": "build"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"name": "@elastic/foo",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "./target/index.js",
|
||||
"kibana": {
|
||||
"build": {
|
||||
"oss": false
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/bar": "link:../bar"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
"moment": "2.20.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "babel --presets=@babel/preset-env --out-dir target src"
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import bar from '@elastic/bar'; // eslint-disable-line import/no-unresolved
|
||||
|
||||
export default function(val) {
|
||||
return 'test [' + val + '] (' + bar(val) + ')';
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"name": "@elastic/quux",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "./quux.js",
|
||||
"devDependencies": {
|
||||
"shx": "^0.2.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "shx mkdir build; shx cp quux.js build/index.js"
|
||||
},
|
||||
"kibana": {
|
||||
"build": {
|
||||
"intermediateBuildDirectory": "build"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
console.log('@elastic/quux');
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"name": "@elastic/shouldskip",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "./target/index.js",
|
||||
"dependencies": {
|
||||
"@elastic/bar": "link:../bar"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "echo 'should not be called'; false"
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import bar from '@elastic/bar'; // eslint-disable-line import/no-unresolved
|
||||
|
||||
export default function(val) {
|
||||
return 'test [' + val + '] (' + bar(val) + ')';
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`kbn-pm production builds and copies only OSS projects for production 1`] = `
|
||||
Array [
|
||||
"packages/bar/package.json",
|
||||
"packages/bar/src/index.js",
|
||||
"packages/bar/target/index.js",
|
||||
"packages/bar/yarn.lock",
|
||||
"packages/baz/index.js",
|
||||
"packages/baz/package.json",
|
||||
"packages/quux/index.js",
|
||||
"packages/quux/package.json",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`kbn-pm production builds and copies projects for production 1`] = `
|
||||
Array [
|
||||
"packages/bar/package.json",
|
||||
"packages/bar/src/index.js",
|
||||
"packages/bar/target/index.js",
|
||||
"packages/bar/yarn.lock",
|
||||
"packages/baz/index.js",
|
||||
"packages/baz/package.json",
|
||||
"packages/foo/package.json",
|
||||
"packages/foo/src/index.js",
|
||||
"packages/foo/target/index.js",
|
||||
"packages/foo/yarn.lock",
|
||||
"packages/quux/index.js",
|
||||
"packages/quux/package.json",
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`kbn-pm production builds and copies projects for production: packages/bar/package.json 1`] = `
|
||||
Object {
|
||||
"devDependencies": Object {
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
},
|
||||
"main": "./target/index.js",
|
||||
"name": "@elastic/bar",
|
||||
"private": true,
|
||||
"scripts": Object {
|
||||
"build": "babel --presets=@babel/preset-env --out-dir target src",
|
||||
},
|
||||
"version": "1.0.0",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`kbn-pm production builds and copies projects for production: packages/baz/package.json 1`] = `
|
||||
Object {
|
||||
"main": "./index.js",
|
||||
"name": "@elastic/baz",
|
||||
"version": "1.0.0",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`kbn-pm production builds and copies projects for production: packages/foo/package.json 1`] = `
|
||||
Object {
|
||||
"dependencies": Object {
|
||||
"@elastic/bar": "link:../bar",
|
||||
},
|
||||
"devDependencies": Object {
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.3.4",
|
||||
"@babel/preset-env": "^7.3.4",
|
||||
"moment": "2.20.1",
|
||||
},
|
||||
"kibana": Object {
|
||||
"build": Object {
|
||||
"oss": false,
|
||||
},
|
||||
},
|
||||
"main": "./target/index.js",
|
||||
"name": "@elastic/foo",
|
||||
"private": true,
|
||||
"scripts": Object {
|
||||
"build": "babel --presets=@babel/preset-env --out-dir target src",
|
||||
},
|
||||
"version": "1.0.0",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`kbn-pm production builds and copies projects for production: packages/quux/package.json 1`] = `
|
||||
Object {
|
||||
"devDependencies": Object {
|
||||
"shx": "^0.2.2",
|
||||
},
|
||||
"kibana": Object {
|
||||
"build": Object {
|
||||
"intermediateBuildDirectory": "build",
|
||||
},
|
||||
},
|
||||
"main": "./quux.js",
|
||||
"name": "@elastic/quux",
|
||||
"private": true,
|
||||
"scripts": Object {
|
||||
"build": "shx mkdir build; shx cp quux.js build/index.js",
|
||||
},
|
||||
"version": "1.0.0",
|
||||
}
|
||||
`;
|
|
@ -1,93 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import copy from 'cpy';
|
||||
import globby from 'globby';
|
||||
import { join, resolve } from 'path';
|
||||
import tempy from 'tempy';
|
||||
|
||||
import { readPackageJson } from '../../utils/package_json';
|
||||
import { getProjects } from '../../utils/projects';
|
||||
import { buildProductionProjects } from '../build_production_projects';
|
||||
|
||||
describe('kbn-pm production', () => {
|
||||
let tmpDir: string;
|
||||
let buildRoot: string;
|
||||
|
||||
const timeout = 1 * 60 * 1000;
|
||||
|
||||
beforeEach(async () => {
|
||||
tmpDir = tempy.directory();
|
||||
buildRoot = tempy.directory();
|
||||
const fixturesPath = resolve(__dirname, '__fixtures__');
|
||||
|
||||
// Copy all the test fixtures into a tmp dir, as we will be mutating them
|
||||
await copy(['**/*'], tmpDir, {
|
||||
cwd: fixturesPath,
|
||||
dot: true,
|
||||
nodir: true,
|
||||
parents: true,
|
||||
});
|
||||
|
||||
const projects = await getProjects(tmpDir, ['.', './packages/*']);
|
||||
|
||||
for (const project of projects.values()) {
|
||||
// This will both install dependencies and generate `yarn.lock` files
|
||||
await project.installDependencies({
|
||||
extraArgs: ['--silent', '--no-progress'],
|
||||
});
|
||||
}
|
||||
}, timeout);
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/25077
|
||||
test.skip(
|
||||
'builds and copies projects for production',
|
||||
async () => {
|
||||
await buildProductionProjects({ kibanaRoot: tmpDir, buildRoot });
|
||||
|
||||
const files = await globby(['**/*', '!**/node_modules/**'], {
|
||||
cwd: buildRoot,
|
||||
});
|
||||
|
||||
expect(files.sort()).toMatchSnapshot();
|
||||
|
||||
for (const file of files) {
|
||||
if (file.endsWith('package.json')) {
|
||||
expect(await readPackageJson(join(buildRoot, file))).toMatchSnapshot(file);
|
||||
}
|
||||
}
|
||||
},
|
||||
timeout
|
||||
);
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/36579
|
||||
test.skip(
|
||||
'builds and copies only OSS projects for production',
|
||||
async () => {
|
||||
await buildProductionProjects({ kibanaRoot: tmpDir, buildRoot, onlyOSS: true });
|
||||
|
||||
const files = await globby(['**/*', '!**/node_modules/**'], {
|
||||
cwd: buildRoot,
|
||||
});
|
||||
|
||||
expect(files.sort()).toMatchSnapshot();
|
||||
},
|
||||
timeout
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue