Skip to content

Commit

Permalink
Add functional test for multiple scms (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yoshika authored and minzcmu committed Jul 7, 2017
1 parent 0ffd426 commit 369d20b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions features/authorization.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,10 @@ Feature: Authorization
And they update the checkoutUrl
Then the pipeline checkoutUrl is updated
And the pipeline has the same id as before

@ignore
Scenario: SCM Context
And "github:calvin" is logged in
Then they can see the pipeline
And they can start the "main" job
And they can delete the pipeline
4 changes: 4 additions & 0 deletions features/step_definitions/authorization.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ defineSupportCode(({ Before, Given, Then }) => {
case 'calvin':
Assert.strictEqual(decodedToken.username, this.username);
break;
case 'github:calvin':
Assert.strictEqual(decodedToken.username, this.username);
Assert.strictEqual(decodedToken.scmContext, this.scmContext);
break;
default:
return Promise.resolve('pending');
}
Expand Down
1 change: 1 addition & 0 deletions features/support/world.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function CustomWorld({ attach, parameters }) {
this.instance = `${this.protocol}://${process.env.SD_API}`;
this.testOrg = process.env.TEST_ORG;
this.username = process.env.TEST_USERNAME;
this.scmContext = process.env.TEST_SCM_CONTEXT;
this.namespace = 'v4';
this.promiseToWait = time => promiseToWait(time);
this.getJwt = accessKey =>
Expand Down

0 comments on commit 369d20b

Please sign in to comment.