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

Update base README, point to website #4488

Merged
merged 44 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2989e8b
Fixes #4335: Create Stratos static web site with better documentation
vvaradhan Jul 13, 2020
45cd11c
1) Re-organize some more existing doc files.
vvaradhan Jul 13, 2020
d26b948
Landing Page WIP
nwmac Jul 20, 2020
7181236
Documentation tweaks
nwmac Jul 20, 2020
5b394a0
Use better action names
nwmac Jul 20, 2020
bcb5529
More visual improvements to landing page
nwmac Jul 20, 2020
5741bf9
More doc and landing page improvements
nwmac Jul 22, 2020
7383f69
Remove publish workflow for now
nwmac Jul 22, 2020
208baa0
Typo fix
nwmac Jul 22, 2020
fff9924
Moer documentation improvements
nwmac Jul 22, 2020
2bbb535
Remove extra title from helm doc
nwmac Jul 22, 2020
388245c
Fix script when used from npm
nwmac Jul 22, 2020
796729c
Improve layout on mobile devices
nwmac Jul 22, 2020
17aaf09
More documentation improvements
nwmac Jul 22, 2020
3f093d4
Fix typo
nwmac Jul 22, 2020
fd17825
Merge downstream (#4441)
richard-cox Jul 20, 2020
dd34fc5
Show all favorites for an endpoint favorite if there is only one (#4440)
nwmac Jul 20, 2020
244f9fe
Merge downstream - JSON Viewer with dark mode & Header Fixes (#4444)
richard-cox Jul 20, 2020
9c94d60
Fix issues with tests not running if build upload fails (#4453)
nwmac Jul 21, 2020
56f0389
Improve autoscaler e2e logging (#4456)
richard-cox Jul 21, 2020
a4e14c1
Fix check-e2e-pr.sh for pr's from other repos (#4459)
richard-cox Jul 21, 2020
560b524
Convert Client Secret Input Fields to `password` (#4455)
richard-cox Jul 21, 2020
17f4f11
Insecure tlsv10 and tlsv11 ciphers in Stratos UI, bsc#1173295 (#411) …
richard-cox Jul 21, 2020
de9fb7a
[Security] Bump codecov from 3.7.0 to 3.7.1 (#4457)
dependabot-preview[bot] Jul 21, 2020
85290ad
Bump lodash from 4.17.15 to 4.17.19 (#4452)
dependabot[bot] Jul 21, 2020
e3ae282
Website update: Wed 22 Jul 2020 21:55:00 BST
nwmac Jul 22, 2020
99bd6ad
Website update: Wed 22 Jul 2020 21:56:45 BST
nwmac Jul 22, 2020
71bf0ad
Website update: Wed 22 Jul 2020 21:58:22 BST
nwmac Jul 22, 2020
43ffaf6
Remove dist
nwmac Jul 22, 2020
fa55ff2
FIx deploy script to remove old files
nwmac Jul 22, 2020
7147c81
Moer tidy ups
nwmac Jul 23, 2020
c3c9c73
Add CNAME file when publishing
nwmac Jul 23, 2020
67b08dc
Add talks doc
nwmac Jul 23, 2020
f659099
* Fix broken links due to reorganization of documents
vvaradhan Jul 24, 2020
b9bdeda
* Fix Getting Started broken link in page footer
vvaradhan Jul 24, 2020
fbd53ae
Only publish if there are website changes
nwmac Jul 24, 2020
ca1e052
Merge remote-tracking branch 'origin/master' into website
nwmac Jul 24, 2020
a47e5dd
Remove old doc
nwmac Jul 24, 2020
e4785a6
Publish website on merge
nwmac Jul 24, 2020
8b9dc27
Apply new theming process to acme example
richard-cox Jul 28, 2020
092bf5f
First pass at customization docs, most of themeing done
richard-cox Jul 28, 2020
993a137
Final pass at customization docs
richard-cox Jul 29, 2020
65f2127
Update base README, point to website
richard-cox Jul 31, 2020
a41bcd2
Merge remote-tracking branch 'origin/master' into root-readme-docs
richard-cox Aug 7, 2020
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
Prev Previous commit
Next Next commit
Improve autoscaler e2e logging (#4456)
* Improve autoscaler e2e logging
- it looks like the AS returns scaling events 1-2 mins after they occur, which is too late for the test
- add additional logging to print out event table data in case of alternative events being raised
- fix logging if wait for events times out
- add hint in later test that depends on AS scaling event

* Ensure only the schedule rule results in scaling events
  • Loading branch information
richard-cox authored and nwmac committed Jul 22, 2020
commit 56f03896d1fb1e7bef5d6afb5cb7aa5cfc89bdf5
72 changes: 49 additions & 23 deletions src/test-e2e/application/application-autoscaler-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { extendE2ETestTime } from '../helpers/extend-test-helpers';
import { LocaleHelper } from '../locale.helper';
import { CFPage } from '../po/cf-page.po';
import { ConfirmDialogComponent } from '../po/confirm-dialog';
import { TableData } from '../po/list.po';
import { CREATE_APP_DEPLOY_TEST_TYPE, createApplicationDeployTests } from './application-deploy-helper';
import { ApplicationE2eHelper } from './application-e2e-helpers';
import { ApplicationPageAutoscalerTab } from './po/application-page-autoscaler.po';
Expand Down Expand Up @@ -39,6 +40,19 @@ describe('Autoscaler -', () => {

const { testAppName, appDetails } = createApplicationDeployTests(CREATE_APP_DEPLOY_TEST_TYPE.GIT_URL);

// Scaling rules for the policy.
// Note - these should not result in scaling events during the test (we only expect one scaling event due to a schedule)
const memoryUtilThreshold = '90';
const memoryUtilOperator = '>=';
const memoryUtilBreach = '160';

const throughputOperator = '>=';
const throughputThreshold = '100'
const throughputAdjustment = '10';
const throughputAdjustmentType = '% instances';

const memoryUsedThreshold = '500';

describe('Tab Tests -', () => {
beforeAll(() => {
// Should be deployed, no web-socket open, so we can wait for angular again
Expand Down Expand Up @@ -123,9 +137,9 @@ describe('Autoscaler -', () => {
expect(createPolicy.stepper.canNext()).toBeFalsy();
// Fill in form -- valid inputs
createPolicy.stepper.getStepperForm().fill({ metric_type: 'memoryutil' });
createPolicy.stepper.getStepperForm().fill({ operator: '>=' });
createPolicy.stepper.getStepperForm().fill({ threshold: '60' });
createPolicy.stepper.getStepperForm().fill({ breach_duration_secs: '60' });
createPolicy.stepper.getStepperForm().fill({ operator: memoryUtilOperator });
createPolicy.stepper.getStepperForm().fill({ threshold: memoryUtilThreshold });
createPolicy.stepper.getStepperForm().fill({ breach_duration_secs: memoryUtilBreach });
expect(createPolicy.stepper.getMatErrorsCount()).toBe(0);
expect(createPolicy.stepper.getDoneButtonDisabledStatus()).toBe(null);
// Fill in form -- invalid inputs
Expand All @@ -140,20 +154,22 @@ describe('Autoscaler -', () => {
expect(createPolicy.stepper.getDoneButtonDisabledStatus()).toBe(null);
createPolicy.stepper.clickDoneButton();


// Click [Add] button
createPolicy.stepper.clickAddButton();
expect(createPolicy.stepper.getRuleTilesCount()).toBe(2);
expect(createPolicy.stepper.canNext()).toBeFalsy();
// Fill in form -- valid inputs
createPolicy.stepper.getStepperForm().fill({ metric_type: 'throughput' });
createPolicy.stepper.getStepperForm().fill({ operator: throughputOperator, threshold: throughputThreshold });
expect(createPolicy.stepper.getMatErrorsCount()).toBe(0);
expect(createPolicy.stepper.getDoneButtonDisabledStatus()).toBe(null);
// Fill in form -- invalid inputs
createPolicy.stepper.getStepperForm().fill({ adjustment: '10' });
createPolicy.stepper.getStepperForm().fill({ adjustment: throughputAdjustment });
expect(createPolicy.stepper.getMatErrorsCount()).toBe(1);
expect(createPolicy.stepper.getDoneButtonDisabledStatus()).toBe('true');
// Fill in form -- fix invalid inputs
createPolicy.stepper.getStepperForm().fill({ adjustment_type: '% instances' });
createPolicy.stepper.getStepperForm().fill({ adjustment_type: throughputAdjustmentType });
expect(createPolicy.stepper.getMatErrorsCount()).toBe(0);
expect(createPolicy.stepper.getDoneButtonDisabledStatus()).toBe(null);
createPolicy.stepper.clickDoneButton();
Expand Down Expand Up @@ -281,11 +297,11 @@ describe('Autoscaler -', () => {

expect(appAutoscaler.tableTriggers.getTableRowsCount()).toBe(2);
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 0)).toBe('memoryutil');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 1)).toBe('>=60 % for 60 secs.');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 1)).toBe(`${memoryUtilOperator}${memoryUtilThreshold} % for ${memoryUtilBreach} secs.`);
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 2)).toBe('+2 instances');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(1, 0)).toBe('throughput');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(1, 1)).toBe('<=10rps for 120 secs.');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(1, 2)).toBe('-10% instances');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(1, 1)).toBe(`${throughputOperator}${throughputThreshold}rps for 120 secs.`);
expect(appAutoscaler.tableTriggers.getTableRowCellContent(1, 2)).toBe(`+${throughputAdjustment}${throughputAdjustmentType}`);

expect(appAutoscaler.tableSchedules.getScheduleTableTitleText()).toBe('Scheduled Limit Rules in UTC');
expect(appAutoscaler.tableSchedules.getRecurringTableRowsCount()).toBe(1);
Expand Down Expand Up @@ -349,7 +365,14 @@ describe('Autoscaler -', () => {

it('Should pass ScalingRules Step', () => {
createPolicy.stepper.clickAddButton();
createPolicy.stepper.getStepperForm().getControlsMap().then(map => {
expect(map['metric_type'].value).toBe('memoryused')
});
createPolicy.stepper.getStepperForm().fill({ threshold: memoryUsedThreshold });
expect(createPolicy.stepper.getMatErrorsCount()).toBe(0);
expect(createPolicy.stepper.getDoneButtonDisabledStatus()).toBe(null);
createPolicy.stepper.clickDoneButton();

expect(createPolicy.stepper.canNext()).toBeTruthy();
createPolicy.stepper.next();
});
Expand Down Expand Up @@ -396,7 +419,7 @@ describe('Autoscaler -', () => {
expect(appAutoscaler.cardMetric.getMetricChartTitleText(2)).toContain('memoryused');
expect(appAutoscaler.tableTriggers.getTableRowsCount()).toBe(3);
expect(appAutoscaler.tableTriggers.getTableRowCellContent(2, 0)).toBe('memoryused');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(2, 1)).toBe('<=10MB for 120 secs.');
expect(appAutoscaler.tableTriggers.getTableRowCellContent(2, 1)).toBe(`<=${memoryUsedThreshold}MB for 120 secs.`);
expect(appAutoscaler.tableTriggers.getTableRowCellContent(2, 2)).toBe('-1 instances');

expect(appAutoscaler.tableSchedules.getRecurringTableRowsCount()).toBe(0);
Expand Down Expand Up @@ -447,7 +470,7 @@ describe('Autoscaler -', () => {
describe('Autoscaler Event Page - ', () => {
const loggingPrefix = 'AutoScaler Event Table:';
let eventPageBase: PageAutoscalerEventBase;
describe('From autoscaler event card', () => {
describe('From autoscaler event card - ', () => {
beforeAll(() => {
const appAutoscaler = new ApplicationPageAutoscalerTab(appDetails.cfGuid, appDetails.appGuid);
appAutoscaler.goToAutoscalerTab();
Expand Down Expand Up @@ -482,36 +505,39 @@ describe('Autoscaler -', () => {
// Timeout after 32 attempts (each 5 seconds, which is just under 3 minutes)
let retries = 32;
const sub = timer(5000, 5000).pipe(
switchMap(() => promise.all<boolean | number>([
switchMap(() => promise.all<boolean | number | TableData[]>([
findRow(),
eventPageBase.list.header.isRefreshing()
eventPageBase.list.header.isRefreshing(),
eventPageBase.list.table.getTableData()
]))
).subscribe(([foundRow, isRefreshing]) => {
).subscribe(([foundRow, isRefreshing, tableData]: [boolean, number, TableData[]]) => {
// These console.logs help by
// .. Showing the actual time we're checking, which can be compared with schedule start/end times
// .. Showing when successful runs complete, over time this should show on average events take to show
const time = moment().toString()
console.log(`${time}: Table Data: `, tableData);

if (isRefreshing) {
console.log(`${moment().toString()}: Waiting for event row: Skip actions... list is refreshing`);
console.log(`${time}: Waiting for event row: Skip actions... list is refreshing`);
return;
}
retries--;
if (foundRow) {
console.log(`${moment().toString()}: Waiting for event row: Found row!`);
console.log(`${time}: Waiting for event row: Found row!`);
sub.unsubscribe();
} else {
console.log(`${moment().toString()}: Waiting for event row: manually refreshing list`);
eventPageBase.list.header.refresh();
if (retries === 0) {
// Fail the test if the retry count made it down to 0
e2e.debugLog('Timed out waiting for event row');
fail('Timed out waiting for event row');
sub.unsubscribe();
} else {
console.log(`${time}: Waiting for event row: manually refreshing list`);
eventPageBase.list.header.refresh();
}
}
});
browser.wait(() => sub.closed);
// Fail the test if the retry count made it down to 0
if (retries === 0) {
e2e.debugLog('Timed out waiting for event row');
fail('Timed out waiting for event row');
}
}

it('Go to events page', () => {
Expand All @@ -534,7 +560,7 @@ describe('Autoscaler -', () => {
browser.wait(ApplicationPageAutoscalerTab.detect()
.then(appAutoscaler => {
appAutoscaler.tableEvents.clickRefreshButton();
expect(appAutoscaler.tableEvents.getTableRowsCount()).toBe(1);
expect(appAutoscaler.tableEvents.getTableRowsCount()).toBe(1, 'Expected rows to be one, could be extremely late event reporting');
expect(appAutoscaler.tableEvents.getTableRowCellContent(0, 0)).toBe('Instances scaled up from 1 to 2');
expect(appAutoscaler.tableEvents.getTableRowCellContent(0, 1))
.toBe('schedule starts with instance min 2, instance max 10 and instance min initial 2 limited by min instances 2');
Expand Down
2 changes: 0 additions & 2 deletions src/test-e2e/po/form.po.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { e2e } from './../e2e';
import { browser, by, element, promise } from 'protractor';
import { ElementArrayFinder, ElementFinder, protractor } from 'protractor/built';
import { Key } from 'selenium-webdriver';

import { Component } from './component.po';
import { P } from '@angular/cdk/keycodes';

const until = protractor.ExpectedConditions;

Expand Down
6 changes: 5 additions & 1 deletion src/test-e2e/po/list.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export interface CardMetadata {
click: () => void;
}

export interface TableData {
[columnHeader: string]: string
}

// Page Object for the List Table View
export class ListTableComponent extends Component {

Expand Down Expand Up @@ -59,7 +63,7 @@ export class ListTableComponent extends Component {
});
}

getTableData(): promise.Promise<{ [columnHeader: string]: string }[]> {
getTableData(): promise.Promise<TableData[]> {
return this.getTableDataRaw().then(tableData => {
const table = [];
tableData.rows.forEach((row: string[]) => {
Expand Down