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

Change labels for Veeam Backup Office 365 and update tests #773

Merged
merged 1 commit into from
Sep 11, 2024
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
12 changes: 6 additions & 6 deletions src/react/ui-elements/Veeam/VeeamConfiguration.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ describe('Veeam Configuration UI', () => {
veeamApplicationSelect: () => screen.getByLabelText(/Veeam application/i),
veeamVBO: () =>
screen.getByRole('option', {
name: /Veeam Backup for Microsoft 365 \(pre-v8\)/i,
name: /Veeam Backup for Microsoft 365 \(v6, v7\)/i,
}),
veeamVBOV8: () =>
screen.getByRole('option', {
name: /Veeam Backup for Microsoft 365 \(v8\)/i,
name: /Veeam Backup for Microsoft 365 \(v8\+\)/i,
}),
};

Expand Down Expand Up @@ -105,7 +105,7 @@ describe('Veeam Configuration UI', () => {
});
});

it('should hide immutable backup and Max Veeam Repository Capacity when Veeam Backup for Microsoft 365 pre-v8 is selected', async () => {
it('should hide immutable backup and Max Veeam Repository Capacity when Veeam Backup for Microsoft 365 v6 or v7 is selected', async () => {
//Setup
mockUseAccountsImplementation();
renderVeeamConfigurationForm();
Expand Down Expand Up @@ -135,7 +135,7 @@ describe('Veeam Configuration UI', () => {
expect(screen.getByText(/Cancel/i)).toBeInTheDocument();
});

it('should disable immutable backup when Veeam Backup for Microsoft 365 pre-v8 is selected', async () => {
it('should disable immutable backup when Veeam Backup for Microsoft 365 v6 or v7 is selected', async () => {
const SUT = jest.fn();
mockUseStepper.mockReturnValue({ next: SUT });
mockUseAccountsImplementation();
Expand All @@ -149,7 +149,7 @@ describe('Veeam Configuration UI', () => {

expect(SUT).toHaveBeenCalledWith({
accountName: 'Veeam',
application: 'Veeam Backup for Microsoft 365 (pre-v8)',
application: 'Veeam Backup for Microsoft 365 (v6, v7)',
bucketName: 'veeam-bucket',
capacityBytes: '4294967296',
enableImmutableBackup: false,
Expand All @@ -170,7 +170,7 @@ describe('Veeam Configuration UI', () => {

expect(SUT).toHaveBeenCalledWith({
accountName: 'Veeam',
application: 'Veeam Backup for Microsoft 365 (v8)',
application: 'Veeam Backup for Microsoft 365 (v8+)',
bucketName: 'veeam-bucket',
capacityBytes: '4294967296',
enableImmutableBackup: true,
Expand Down
8 changes: 4 additions & 4 deletions src/react/ui-elements/Veeam/VeeamConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export const BUCKET_TAG_VEEAM_APPLICATION = 'X-Scality-Veeam-Application';
export const VEEAM_BACKUP_REPLICATION = 'Veeam Backup & Replication';
export const VEEAM_BACKUP_REPLICATION_XML_VALUE =
'Veeam Backup & Replication';
export const VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365 (pre-v8)';
export const VEEAM_OFFICE_365_V8 = 'Veeam Backup for Microsoft 365 (v8)';
export const VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365 (v6, v7)';
export const VEEAM_OFFICE_365_V8 = 'Veeam Backup for Microsoft 365 (v8+)';
export const VEEAM_IMMUTABLE_POLICY_NAME = 'Scality-Veeam-Immutable-Policy';
export const GET_VEEAM_IMMUTABLE_POLICY = (bucketName: string) =>
JSON.stringify({
Expand Down Expand Up @@ -47,8 +47,8 @@ export const GET_CAPACITY_XML_CONTENT = (capacity: string) =>
export const VEEAM_DEFAULT_ACCOUNT_NAME = 'Veeam';
export enum VeeamApplicationType {
VEEAM_BACKUP_REPLICATION = 'Veeam Backup & Replication',
VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365 (pre-v8)',
VEEAM_OFFICE_365_V8 = 'Veeam Backup for Microsoft 365 (v8)',
VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365 (v6, v7)',
VEEAM_OFFICE_365_V8 = 'Veeam Backup for Microsoft 365 (v8+)',
}
export const unitChoices = {
GiB: 1024 ** 3,
Expand Down
6 changes: 3 additions & 3 deletions src/react/ui-elements/Veeam/VeeamTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ describe('VeeamTable', () => {
veeamApplicationSelect: () => screen.getByLabelText(/Veeam application/i),
veeamVBO: () =>
screen.getByRole('option', {
name: /Veeam Backup for Microsoft 365 \(pre-v8\)/i,
name: /Veeam Backup for Microsoft 365 \(v6, v7\)/i,
}),
veeamVBOV8: () =>
screen.getByRole('option', {
name: /Veeam Backup for Microsoft 365 \(v8\)/i,
name: /Veeam Backup for Microsoft 365 \(v8\+\)/i,
}),
immutableBackupToggle: () => screen.getByLabelText('enableImmutableBackup'),
};
Expand Down Expand Up @@ -210,7 +210,7 @@ describe('VeeamTable', () => {
await verifySuccessActions(mutationActions);
});

it('should skip the SOSAPI setup step when choosing Veeam Backup for Microsoft 365 (pre-v8)', async () => {
it('should skip the SOSAPI setup step when choosing Veeam Backup for Microsoft 365 (v6 or v7)', async () => {
//Setup
server.resetHandlers(...goodHandlers);
setupTest();
Expand Down
Loading