Skip to content

Commit

Permalink
Fix review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhirverma committed Mar 11, 2021
1 parent e1977f2 commit deb8a47
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pipeline/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { TknResourceItem } from '../tekton/webviewstartpipeline';
import { startPipeline } from '../tekton/startpipeline';
import { addTriggerToPipeline } from '../tekton/addtrigger';
import { createPvc } from '../tekton/createpvc';
import { startPipelineFromYaml } from '../tekton/startpipelinefromyaml';
import { startPipelineFromYaml } from '../tekton/start-pipeline-from-json';

export interface PipelineWizardInput {
readonly resourceColumn: vscode.ViewColumn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ function getPipelineRunWorkspaces(workspace: Workspaces[], volumeClaimTemplate:
claimName: value.workspaceName
}
} else if (value.workspaceType === 'EmptyDirectory') {
workspaceObject['persistentVolumeClaim'] = {
claimName: value.workspaceName,
emptyDir: {}
}
workspaceObject['emptyDir'] = {}
}
newWorkSpace.push(workspaceObject);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as chai from 'chai';
import * as sinonChai from 'sinon-chai';
import * as sinon from 'sinon';
import * as vscode from 'vscode';
import { getPipelineRun } from '../../src/tekton/startpipelinefromyaml';
import { cli } from '../../src/cli';
import { getPipelineRun } from '../../src/tekton/start-pipeline-from-json';

const expect = chai.expect;
chai.use(sinonChai);
Expand All @@ -31,6 +31,25 @@ suite('Tekton/startPipeline', () => {
name: 'test',
resourceRef: 'test'
}],
workspaces: [
{
item: [],
name: 'password-vault',
workspaceName: 'secret-password',
workspaceType: 'Secret'
},
{
item: [],
name: 'recipe-store',
workspaceName: 'sensitive-recipe-storage',
workspaceType: 'ConfigMap'
},
{
item: [],
name: 'test',
workspaceType: 'EmptyDirectory'
}
],
serviceAccount: 'default',
volumeClaimTemplate: [
{
Expand Down Expand Up @@ -100,6 +119,24 @@ suite('Tekton/startPipeline', () => {
serviceAccountName: 'default',
status: null,
workspaces: [
{
name: 'password-vault',
secret: {
items: [],
secretName: 'secret-password'
}
},
{
configMap: {
items: [],
name: 'sensitive-recipe-storage'
},
name: 'recipe-store'
},
{
emptyDir: {},
name: 'test'
},
{
name: 'shared-workspace',
volumeClaimTemplate: {
Expand Down

0 comments on commit deb8a47

Please sign in to comment.