Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: droctothorpe <[email protected]>
  • Loading branch information
droctothorpe committed Aug 15, 2024
1 parent e7e57b9 commit 937e523
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions frontend/server/workflow-helper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,31 +147,28 @@ describe('workflow-helper', () => {
apiVersion: 'argoproj.io/v1alpha1',
kind: 'Workflow',
status: {
artifactRepositoryRef: {
artifactRepository: {
archiveLogs: true,
s3: {
accessKeySecret: { key: 'accessKey', name: 'accessKeyName' },
bucket: 'bucket',
endpoint: 'minio-service.kubeflow',
insecure: true,
key:
'prefix/workflow-name/workflow-name-system-container-impl-abc/some-artifact.csv',
secretKeySecret: { key: 'secretKey', name: 'secretKeyName' },
},
},
},
nodes: {
'workflow-name-abc': {
outputs: {
artifacts: [
{
name: 'some-artifact.csv',
s3: {
accessKeySecret: { key: 'accessKey', name: 'accessKeyName' },
bucket: 'bucket',
endpoint: 'minio-service.kubeflow',
insecure: true,
key: 'prefix/workflow-name/workflow-name-abc/some-artifact.csv',
secretKeySecret: { key: 'secretKey', name: 'secretKeyName' },
},
},
{
archiveLogs: true,
name: 'main.log',
name: 'main-logs',
s3: {
accessKeySecret: { key: 'accessKey', name: 'accessKeyName' },
bucket: 'bucket',
endpoint: 'minio-service.kubeflow',
insecure: true,
key: 'prefix/workflow-name/workflow-name-abc/main.log',
secretKeySecret: { key: 'secretKey', name: 'secretKeyName' },
key: 'prefix/workflow-name/workflow-name-system-container-impl-abc/main.log',
},
},
],
Expand All @@ -193,7 +190,10 @@ describe('workflow-helper', () => {
mockedClientGetObject.mockResolvedValueOnce(objStream);
objStream.end('some fake logs.');

const stream = await getPodLogsStreamFromWorkflow('workflow-name-abc', '2024-07-09');
const stream = await getPodLogsStreamFromWorkflow(
'workflow-name-system-container-impl-abc',
'2024-07-09',
);

expect(mockedGetArgoWorkflow).toBeCalledWith('workflow-name');

Expand All @@ -212,7 +212,7 @@ describe('workflow-helper', () => {
expect(mockedClientGetObject).toBeCalledTimes(1);
expect(mockedClientGetObject).toBeCalledWith(
'bucket',
'prefix/workflow-name/workflow-name-abc/main.log',
'prefix/workflow-name/workflow-name-system-container-impl-abc/main.log',
);
});
});
Expand Down

0 comments on commit 937e523

Please sign in to comment.