[Monitoring] Skip tests for cloud (#30879) (#31069)

* Skip tests for cloud

* Add TODOs
This commit is contained in:
Chris Roberson 2019-02-14 09:12:07 -05:00 committed by GitHub
parent 8c16cb1619
commit b2fbb335f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 89 additions and 66 deletions

View file

@ -11,7 +11,10 @@ export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
describe('overview', () => {
describe('overview', function () {
// TODO: https://github.com/elastic/stack-monitoring/issues/31
this.tags(['skipCloud']);
describe('with trial license clusters', () => {
const archive = 'monitoring/singlecluster-green-gold';
const timeRange = {

View file

@ -11,7 +11,10 @@ export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
describe('node detail', () => {
describe('node detail', function () {
// TODO: https://github.com/elastic/stack-monitoring/issues/31
this.tags(['skipCloud']);
const archive = 'monitoring/singlecluster-three-nodes-shard-relocation';
const timeRange = {
min: '2017-10-05T20:31:48.000Z',

View file

@ -9,7 +9,10 @@ import expect from 'expect.js';
export default function ({ getService }) {
const supertest = getService('supertest');
describe('check nodes settings', () => {
describe('check nodes settings', function () {
// TODO: https://github.com/elastic/stack-monitoring/issues/31
this.tags(['skipCloud']);
it('should check node settings', async () => {
const { body } = await supertest
.get('/api/monitoring/v1/elasticsearch_settings/check/nodes')

View file

@ -11,7 +11,10 @@ export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
describe('clusters', () => {
describe('clusters', function () {
// TODO: https://github.com/elastic/stack-monitoring/issues/31
this.tags(['skipCloud']);
const archive = 'monitoring/standalone_cluster';
const timeRange = {
min: '2019-02-04T16:52:11.741Z',

View file

@ -87,7 +87,10 @@ export default function ({ getService, getPageObjects }) {
await tearDown();
});
describe('cluster row content', () => {
describe('cluster row content', function () {
// TODO: https://github.com/elastic/stack-monitoring/issues/31
this.tags(['skipCloud']);
it('non-primary basic cluster shows NA for everything', async () => {
expect(await clusterList.getClusterName(UNSUPPORTED_CLUSTER_UUID)).to.be('staging');
expect(await clusterList.getClusterStatus(UNSUPPORTED_CLUSTER_UUID)).to.be('-');
@ -111,14 +114,17 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('cluster row actions', () => {
describe('cluster row actions', function () {
// TODO: https://github.com/elastic/stack-monitoring/issues/31
this.tags(['skipCloud']);
it('clicking the non-primary basic cluster shows a toast message', async () => {
const basicClusterLink = await clusterList.getClusterLink(UNSUPPORTED_CLUSTER_UUID);
await basicClusterLink.click();
expect(await testSubjects.exists('monitoringLicenseWarning', { timeout: 2000 })).to.be(true);
});
it('clicking the primary basic cluster goes to overview', async () => {
it('clicking the primary basic cluster goes to overview', async function () {
const primaryBasicClusterLink = await clusterList.getClusterLink(SUPPORTED_CLUSTER_UUID);
await primaryBasicClusterLink.click();

View file

@ -44,40 +44,71 @@ export default function ({ getService, getPageObjects }) {
});
});
it('should have a nodes table with correct rows with default sorting', async () => {
const rows = await nodesList.getRows();
expect(rows.length).to.be(3);
describe('skipCloud', function () {
// TODO: https://github.com/elastic/stack-monitoring/issues/31
this.tags(['skipCloud']);
const nodesAll = await nodesList.getNodesAll();
const tableData = [
{
name: 'whatever-01',
status: 'Status: Online',
cpu: '0% \n3% max\n0% min',
load: '3.28 \n3.71 max\n2.19 min',
memory: '39% \n52% max\n25% min',
disk: '173.9 GB \n173.9 GB max\n173.9 GB min',
shards: '38',
},
{
name: 'whatever-02',
status: 'Status: Online',
cpu: '2% \n3% max\n0% min',
load: '3.28 \n3.73 max\n2.29 min',
memory: '25% \n49% max\n25% min',
disk: '173.9 GB \n173.9 GB max\n173.9 GB min',
shards: '38',
},
{ name: 'whatever-03', status: 'Status: Offline' },
];
nodesAll.forEach((obj, node) => {
expect(nodesAll[node].name).to.be(tableData[node].name);
expect(nodesAll[node].status).to.be(tableData[node].status);
expect(nodesAll[node].cpu).to.be(tableData[node].cpu);
expect(nodesAll[node].load).to.be(tableData[node].load);
expect(nodesAll[node].memory).to.be(tableData[node].memory);
expect(nodesAll[node].disk).to.be(tableData[node].disk);
expect(nodesAll[node].shards).to.be(tableData[node].shards);
it('should have a nodes table with correct rows with default sorting', async () => {
const rows = await nodesList.getRows();
expect(rows.length).to.be(3);
const nodesAll = await nodesList.getNodesAll();
const tableData = [
{
name: 'whatever-01',
status: 'Status: Online',
cpu: '0% \n3% max\n0% min',
load: '3.28 \n3.71 max\n2.19 min',
memory: '39% \n52% max\n25% min',
disk: '173.9 GB \n173.9 GB max\n173.9 GB min',
shards: '38',
},
{
name: 'whatever-02',
status: 'Status: Online',
cpu: '2% \n3% max\n0% min',
load: '3.28 \n3.73 max\n2.29 min',
memory: '25% \n49% max\n25% min',
disk: '173.9 GB \n173.9 GB max\n173.9 GB min',
shards: '38',
},
{ name: 'whatever-03', status: 'Status: Offline' },
];
nodesAll.forEach((obj, node) => {
expect(nodesAll[node].name).to.be(tableData[node].name);
expect(nodesAll[node].status).to.be(tableData[node].status);
expect(nodesAll[node].cpu).to.be(tableData[node].cpu);
expect(nodesAll[node].load).to.be(tableData[node].load);
expect(nodesAll[node].memory).to.be(tableData[node].memory);
expect(nodesAll[node].disk).to.be(tableData[node].disk);
expect(nodesAll[node].shards).to.be(tableData[node].shards);
});
});
it('should sort by cpu', async () => {
await nodesList.clickCpuCol();
await nodesList.clickCpuCol();
const nodesAll = await nodesList.getNodesAll();
const tableData = [{ cpu: '0% \n3% max\n0% min' }, { cpu: '2% \n3% max\n0% min' }, { cpu: undefined }];
nodesAll.forEach((obj, node) => {
expect(nodesAll[node].cpu).to.be(tableData[node].cpu);
});
});
it('should sort by load average', async () => {
await nodesList.clickLoadCol();
await nodesList.clickLoadCol();
const nodesAll = await nodesList.getNodesAll();
const tableData = [
{ load: '3.28 \n3.71 max\n2.19 min' },
{ load: '3.28 \n3.73 max\n2.29 min' },
{ load: undefined },
];
nodesAll.forEach((obj, node) => {
expect(nodesAll[node].load).to.be(tableData[node].load);
});
});
});
@ -111,32 +142,6 @@ export default function ({ getService, getPageObjects }) {
});
});
it('should sort by cpu', async () => {
await nodesList.clickCpuCol();
await nodesList.clickCpuCol();
const nodesAll = await nodesList.getNodesAll();
const tableData = [{ cpu: '0% \n3% max\n0% min' }, { cpu: '2% \n3% max\n0% min' }, { cpu: undefined }];
nodesAll.forEach((obj, node) => {
expect(nodesAll[node].cpu).to.be(tableData[node].cpu);
});
});
it('should sort by load average', async () => {
await nodesList.clickLoadCol();
await nodesList.clickLoadCol();
const nodesAll = await nodesList.getNodesAll();
const tableData = [
{ load: '3.28 \n3.71 max\n2.19 min' },
{ load: '3.28 \n3.73 max\n2.29 min' },
{ load: undefined },
];
nodesAll.forEach((obj, node) => {
expect(nodesAll[node].load).to.be(tableData[node].load);
});
});
it('should sort by memory', async () => {
await nodesList.clickMemoryCol();
await nodesList.clickMemoryCol();