Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
fix put/delete tag CI (#64)
Browse files Browse the repository at this point in the history
Co-authored-by: shaiic-pai <contribute@shaiic.com>
  • Loading branch information
suiguoxin and shaiic-pai committed Sep 21, 2020
1 parent 3789582 commit 84e9ffb
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions tests/common/apiTestCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ const deleteTestGroup: IApiOperation = {
}]
};

const addTestTag: IApiOperation = {
tag: 'job',
operationId: 'addTag',
parameters: [
{
function addTestTag(): IApiOperation {
return {
tag: 'job',
operationId: 'addTag',
parameters: [{
type: 'raw',
value: clustersJson[0].username
},
Expand All @@ -96,15 +96,15 @@ const addTestTag: IApiOperation = {
{
type: 'raw',
value: 'testTag'
}
]
};
}]
};
}

const deleteTestTag: IApiOperation = {
tag: 'job',
operationId: 'deleteTag',
parameters: [
{
function deleteTestTag(): IApiOperation {
return {
tag: 'job',
operationId: 'deleteTag',
parameters: [{
type: 'raw',
value: clustersJson[0].username
},
Expand All @@ -115,9 +115,9 @@ const deleteTestTag: IApiOperation = {
{
type: 'raw',
value: 'testTag'
}
]
};
}]
};
}

function createTestJob(): IApiOperation {
return {
Expand Down Expand Up @@ -939,14 +939,14 @@ export const ApiDefaultTestCases: {[key: string]: IApiTestCase} = {
'put /api/v2/jobs/{user}~{job}/tag': {
before: [ createTestJob() ],
tests: [{
operation: addTestTag
operation: addTestTag()
}],
after: [ updateTestJobExecutionType('STOP'), deleteTestTag ]
after: [ updateTestJobExecutionType('STOP'), deleteTestTag() ]
},
'delete /api/v2/jobs/{user}~{job}/tag': {
before: [ createTestJob(), addTestTag ],
before: [ createTestJob(), addTestTag() ],
tests: [{
operation: deleteTestTag
operation: deleteTestTag()
}],
after: [ updateTestJobExecutionType('STOP') ]
},
Expand Down

0 comments on commit 84e9ffb

Please sign in to comment.