mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Snapshot & Restore] Add support for S3 onezone_ia (#154346)
This commit is contained in:
parent
e9bed322e9
commit
bc245ea173
2 changed files with 42 additions and 0 deletions
|
@ -593,5 +593,46 @@ describe('<RepositoryAdd />', () => {
|
|||
})
|
||||
);
|
||||
});
|
||||
|
||||
test('should correctly set the onezone_ia storage class', async () => {
|
||||
const { form, actions, component } = testBed;
|
||||
|
||||
const s3Repository = getRepository({
|
||||
type: 's3',
|
||||
settings: {
|
||||
bucket: 'test_bucket',
|
||||
storageClass: 'onezone_ia',
|
||||
},
|
||||
});
|
||||
|
||||
// Fill step 1 required fields and go to step 2
|
||||
form.setInputValue('nameInput', s3Repository.name);
|
||||
actions.selectRepositoryType(s3Repository.type);
|
||||
actions.clickNextButton();
|
||||
|
||||
// Fill step 2
|
||||
form.setInputValue('bucketInput', s3Repository.settings.bucket);
|
||||
form.setSelectValue('storageClassSelect', s3Repository.settings.storageClass);
|
||||
|
||||
await act(async () => {
|
||||
actions.clickSubmitButton();
|
||||
});
|
||||
|
||||
component.update();
|
||||
|
||||
expect(httpSetup.put).toHaveBeenLastCalledWith(
|
||||
`${API_BASE_PATH}repositories`,
|
||||
expect.objectContaining({
|
||||
body: JSON.stringify({
|
||||
name: s3Repository.name,
|
||||
type: s3Repository.type,
|
||||
settings: {
|
||||
bucket: s3Repository.settings.bucket,
|
||||
storageClass: s3Repository.settings.storageClass,
|
||||
},
|
||||
}),
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -76,6 +76,7 @@ export const S3Settings: React.FunctionComponent<Props> = ({
|
|||
'reduced_redundancy',
|
||||
'standard_ia',
|
||||
'intelligent_tiering',
|
||||
'onezone_ia',
|
||||
].map((option) => ({
|
||||
value: option,
|
||||
text: option,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue