Wizard: Add Timezone to on-prem mapper
This adds Timezone values to the on-prem mapper and updates the import test to check for expected values.
This commit is contained in:
parent
590855c7f3
commit
1533830095
2 changed files with 24 additions and 0 deletions
|
|
@ -172,6 +172,10 @@ minsize = 2147483648
|
|||
[customizations.installer]
|
||||
unattended = true
|
||||
sudo-nopasswd = ["user", "%wheel"]
|
||||
|
||||
[customizations.timezone]
|
||||
timezone = "US/Eastern"
|
||||
ntpservers = ["0.north-america.pool.ntp.org", "1.north-america.pool.ntp.org"]
|
||||
`;
|
||||
|
||||
const uploadFile = async (filename: string, content: string): Promise<void> => {
|
||||
|
|
@ -340,6 +344,19 @@ describe('Import modal', () => {
|
|||
await user.click(await screen.findByTestId('packages-selected-toggle'))
|
||||
);
|
||||
|
||||
// Users
|
||||
await clickNext();
|
||||
|
||||
// Timezone
|
||||
await clickNext();
|
||||
await screen.findByRole('heading', { name: /Timezone/ });
|
||||
const timezoneDropDown = await screen.findByPlaceholderText(
|
||||
/Select a timezone/i
|
||||
);
|
||||
expect(timezoneDropDown).toHaveValue('US/Eastern');
|
||||
await screen.findByText(/0\.north-america\.pool\.ntp\.org/i);
|
||||
await screen.findByText(/1\.north-america\.pool\.ntp\.org/i);
|
||||
|
||||
await clickNext();
|
||||
}, 20000);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -146,6 +146,13 @@ export const mapOnPremToHosted = (
|
|||
enabled: blueprint.customizations?.fips,
|
||||
}
|
||||
: undefined,
|
||||
timezone:
|
||||
blueprint.customizations?.timezone !== undefined
|
||||
? {
|
||||
timezone: blueprint.customizations.timezone.timezone,
|
||||
ntpservers: blueprint.customizations.timezone.ntpservers,
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
metadata: {
|
||||
parent_id: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue