Skip to content

Commit

Permalink
Merge pull request #8681 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…8670-to-release-4.7

[release-4.7] Bug 1950214: Fix start pipeline action access review
  • Loading branch information
openshift-merge-robot committed Apr 29, 2021
2 parents 66a6ffd + 69e114a commit f66f4f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ describe('PipelineAction testing startPipeline create correct labels and callbac
});
});

describe('PipelineAction testing startPipeline to check the pipelinerun access review', () => {
it('expect access review check on pipelinerun resource', () => {
const pipeline = startPipeline(PipelineModel, samplePipeline);
expect(pipeline.accessReview.resource).toBe(PipelineRunModel.plural);
});
});

describe('PipelineAction testing stopPipelineRun create correct labels and callbacks', () => {
it('expect label to be "Stop" with hidden flag as false when latest Run is running', () => {
const stopAction = stopPipelineRun(PipelineRunModel, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ export const startPipeline: KebabAction = (
}
},
accessReview: {
group: kind.apiGroup,
resource: kind.plural,
name: pipeline.metadata.name,
group: PipelineRunModel.apiGroup,
resource: PipelineRunModel.plural,
namespace: pipeline.metadata.namespace,
verb: 'create',
},
Expand Down

0 comments on commit f66f4f8

Please sign in to comment.