-
Notifications
You must be signed in to change notification settings - Fork 4k
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
chore(toolkit): requireApproval option for deploy #32977
base: main
Are you sure you want to change the base?
Conversation
@@ -148,9 +150,9 @@ export interface BaseDeployOptions { | |||
* A 'hotswap' deployment will attempt to short-circuit CloudFormation | |||
* and update the affected resources like Lambda functions directly. | |||
* | |||
* @default - `HotswapMode.FALL_BACK` for regular deployments, `HotswapMode.HOTSWAP_ONLY` for 'watch' deployments | |||
* @default - no hotswap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is the correct thing to say here
stack: { | ||
stackName: stack.stackName, | ||
hierarchicalId: stack.hierarchicalId, | ||
template: stack.template, | ||
stringifiedJson: serializeStructure(obscuredTemplate, true), | ||
stringifiedYaml: serializeStructure(obscuredTemplate, false), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am not quite sure exactly what information we want to send via this channel but i mostly copied what was done on synth
beforeEach(() => { | ||
requestResponseSpy.mockClear(); | ||
notifySpy.mockClear(); | ||
mockCloudFormationClient.reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all this mockCloudFormation stuff is copied over. there's a whole bunch more to mock as we add more unit tests...
})); | ||
}); | ||
|
||
test('deploy from app', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again this one doesn't work yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need to test all the different assembly types on all commands. Once it has synth'd it should be.
eaf5f8c
to
3e1c437
Compare
const cx = await cdk.fromAssemblyBuilder(async () => { | ||
const app = new core.App(); | ||
const stack = new core.Stack(app, 'Stack1'); | ||
new iam.Role(stack, 'Role', { | ||
assumedBy: new iam.ArnPrincipal('arn'), | ||
}); | ||
return app.synth() as any; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Let's move it into fixtures so other tests can re-use it.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32977 +/- ##
=======================================
Coverage 81.44% 81.44%
=======================================
Files 225 225
Lines 13702 13702
Branches 2404 2404
=======================================
Hits 11160 11160
Misses 2267 2267
Partials 275 275
Flags with carried forward coverage won't be shown. Click here to find out more.
|
adds toolkit tests for deploy
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license