Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Monitoring] Skip tests for cloud #30879

Merged
merged 3 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
14 changes: 10 additions & 4 deletions x-pack/test/functional/apps/monitoring/cluster/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('-');
Expand All @@ -111,20 +114,23 @@ 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();

expect(await clusterOverview.isOnClusterOverview()).to.be(true);

expect(await clusterOverview.getClusterName()).to.be('production');

await PageObjects.monitoring.clickBreadcrumb('breadcrumbClusters'); // reset for next test
});

Expand Down
123 changes: 64 additions & 59 deletions x-pack/test/functional/apps/monitoring/elasticsearch/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

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);
});
});

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);
});
});
});

Expand Down Expand Up @@ -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();
Expand Down