Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ export async function deployStack(options: DeployStackOptions, ioHelper: IoHelpe
);

if (hotswapDeploymentResult) {
await ioHelper.defaults.info(
`Your next non-hotswap deployment with ${stackEnv.name} should include '--revert-drift' to resolve the drift that was introduced while hotswapping.`,
);
return hotswapDeploymentResult;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,24 @@ test('correctly passes SSM parameters when hotswapping', async () => {
);
});

test('prints revert-drift recommendation on successful hotswap deployment', async () => {
givenStackExists();
(tryHotswapDeployment as jest.Mock).mockResolvedValue({
type: 'did-deploy-stack', noOp: false, stackArn: 'arn:stack', outputs: {},
});

// WHEN
await testDeployStack({
...standardDeployStackArguments(),
deploymentMethod: { method: 'hotswap' },
});

// THEN
expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({
message: expect.stringMatching(/should include '--revert-drift' to resolve the drift that was introduced while hotswapping/),
}));
});

describe('hotswap template cache', () => {
test('writeHotswapTemplateCache is called on a successful hotswap deployment', async () => {
// GIVEN
Expand Down
Loading