-
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
Conversation
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.
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.
|
public readonly notifySpy: jest.Mock<any, any, any>; | ||
public readonly requestSpy: jest.Mock<any, any, 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!
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
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