Skip to content

Commit

Permalink
[ILM] Refactor edit_policy client integration tests into separate fea…
Browse files Browse the repository at this point in the history
…ture files (elastic#92826)

* Refactor edit_policy client integration tests into separate feature files

* Fixed merge conflicts with master

* Updated rollover tests to match master branch code

* Split reactive_form into smaller files

* Renamed flyout tests file
  • Loading branch information
yuliacech committed Mar 2, 2021
1 parent c450492 commit 1e83ca3
Show file tree
Hide file tree
Showing 14 changed files with 1,373 additions and 1,333 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,6 @@ export const POLICY_NAME = 'my_policy';
export const SNAPSHOT_POLICY_NAME = 'my_snapshot_policy';
export const NEW_SNAPSHOT_POLICY_NAME = 'my_new_snapshot_policy';

export const DEFAULT_POLICY: PolicyFromES = {
version: 1,
modified_date: Date.now().toString(),
policy: {
name: 'my_policy',
phases: {
hot: {
min_age: '0ms',
actions: {
rollover: {
max_age: '30d',
max_size: '50gb',
},
},
},
},
},
name: 'my_policy',
};

export const POLICY_WITH_MIGRATE_OFF: PolicyFromES = {
version: 1,
modified_date: Date.now().toString(),
Expand Down Expand Up @@ -191,6 +171,7 @@ export const POLICY_WITH_NODE_ROLE_ALLOCATION: PolicyFromES = {
},
},
warm: {
min_age: '0ms',
actions: {},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,6 @@ export const setup = async (arg?: {

const enable = (phase: Phases) => createFormToggleAction(`enablePhaseSwitch-${phase}`);

const showDataAllocationOptions = (phase: Phases) => () => {
act(() => {
find(`${phase}-dataTierAllocationControls.dataTierSelect`).simulate('click');
});
component.update();
};

const createMinAgeActions = (phase: Phases) => {
return {
hasMinAgeInput: () => exists(`${phase}-selectedMinimumAge`),
Expand Down Expand Up @@ -384,7 +377,6 @@ export const setup = async (arg?: {
},
warm: {
enable: enable('warm'),
showDataAllocationOptions: showDataAllocationOptions('warm'),
...createMinAgeActions('warm'),
setReplicas: setReplicas('warm'),
hasErrorIndicator: () => exists('phaseErrorIndicator-warm'),
Expand All @@ -396,7 +388,6 @@ export const setup = async (arg?: {
},
cold: {
enable: enable('cold'),
showDataAllocationOptions: showDataAllocationOptions('cold'),
...createMinAgeActions('cold'),
setReplicas: setReplicas('cold'),
setFreeze,
Expand Down
Loading

0 comments on commit 1e83ca3

Please sign in to comment.