Skip to content

Commit 7dda269

Browse files
committed
update a structure of serverless.yml
1 parent 9ae6d01 commit 7dda269

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class ServerlessStepFunctions {
427427
return this.serverless.yamlParser
428428
.parse(serverlessYmlPath)
429429
.then((serverlessFileParam) => {
430-
this.serverless.service.stepFunctions = serverlessFileParam.stepFunctions;
430+
this.serverless.service.stepFunctions = serverlessFileParam.stepFunctions.stateMachine;
431431
this.serverless.variables.populateService(this.serverless.pluginManager.cliOptions);
432432
return BbPromise.resolve();
433433
});

index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ describe('ServerlessStepFunctions', () => {
545545
let yamlParserStub;
546546
beforeEach(() => {
547547
yamlParserStub = sinon.stub(serverlessStepFunctions.serverless.yamlParser, 'parse')
548-
.returns(BbPromise.resolve({ stepFunctions: 'stepFunctions' }));
548+
.returns(BbPromise.resolve({ stepFunctions: { stateMachine: 'stepFunctions' } }));
549549
serverlessStepFunctions.serverless.config.servicePath = 'servicePath';
550550
});
551551

@@ -570,7 +570,7 @@ describe('ServerlessStepFunctions', () => {
570570
it('should return resolve when variables exists in the yaml', () => {
571571
serverlessStepFunctions.serverless.yamlParser.parse.restore();
572572
yamlParserStub = sinon.stub(serverlessStepFunctions.serverless.yamlParser, 'parse')
573-
.returns(BbPromise.resolve({ stepFunctions: '${self:defaults.region}' }));
573+
.returns(BbPromise.resolve({ stepFunctions: { stateMachine: '${self:defaults.region}' } }));
574574
serverlessStepFunctions.yamlParse()
575575
.then(() => {
576576
expect(yamlParserStub.calledOnce).to.be.equal(true);

0 commit comments

Comments
 (0)