mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Add support for S3 intelligent tiering in Snapshot and Restore (#149129)
Closes https://github.com/elastic/kibana/issues/136682 ## Summary This PR adds the "intelligent_tiering" option to the Storage class field in the Repository form for AWS S3. <img width="1299" alt="Screenshot 2023-01-18 at 14 40 10" src="https://user-images.githubusercontent.com/59341489/213200327-60766fca-3261-4441-bc33-463a3d73d0e1.png"> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
57fd55bf85
commit
b49ec7b939
3 changed files with 56 additions and 1 deletions
|
@ -135,6 +135,7 @@ type TestSubjects =
|
|||
| 'stepTwo.readOnlyToggle'
|
||||
| 'stepTwo.submitButton'
|
||||
| 'stepTwo.title'
|
||||
| 'storageClassSelect'
|
||||
| 'submitButton'
|
||||
| 'title'
|
||||
| 'urlRepositoryType';
|
||||
|
|
|
@ -545,4 +545,53 @@ describe('<RepositoryAdd />', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('settings for s3 repository', () => {
|
||||
beforeEach(async () => {
|
||||
httpRequestsMockHelpers.setLoadRepositoryTypesResponse(repositoryTypes);
|
||||
|
||||
testBed = await setup(httpSetup);
|
||||
});
|
||||
|
||||
test('should correctly set the intelligent_tiering storage class', async () => {
|
||||
const { form, actions, component } = testBed;
|
||||
|
||||
const s3Repository = getRepository({
|
||||
type: 's3',
|
||||
settings: {
|
||||
bucket: 'test_bucket',
|
||||
storageClass: 'intelligent_tiering',
|
||||
},
|
||||
});
|
||||
|
||||
// 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,
|
||||
},
|
||||
}),
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -71,7 +71,12 @@ export const S3Settings: React.FunctionComponent<Props> = ({
|
|||
});
|
||||
};
|
||||
|
||||
const storageClassOptions = ['standard', 'reduced_redundancy', 'standard_ia'].map((option) => ({
|
||||
const storageClassOptions = [
|
||||
'standard',
|
||||
'reduced_redundancy',
|
||||
'standard_ia',
|
||||
'intelligent_tiering',
|
||||
].map((option) => ({
|
||||
value: option,
|
||||
text: option,
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue