updating tests

This commit is contained in:
Vallie Joseph
2024-04-09 18:21:41 +00:00
parent 7f0a981b2e
commit f98ccd1e39
3 changed files with 20 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ import {uploadArtifact} from '../src/internal/upload/upload-artifact'
import {noopLogs} from './common'
import {FilesNotFoundError} from '../src/internal/shared/errors'
import {BlockBlobClient} from '@azure/storage-blob'
import mockFs from 'mock-fs'
describe('upload-artifact', () => {
beforeEach(() => {
noopLogs()
@@ -374,6 +374,15 @@ describe('upload-artifact', () => {
destinationPath: 'dir/file3.txt'
}
])
mockFs({
'/home/user/files/plz-upload': {
'file1.txt': 'file1 content',
'file2.txt': 'file2 content',
dir: {
'file3.txt': 'file3 content'
}
}
})
jest.spyOn(util, 'getBackendIdsFromToken').mockReturnValue({
workflowRunBackendId: '1234',