Skip to content

Commit

Permalink
test(plugins/plugin-s3): temporary improvements are needed for s3 vfs…
Browse files Browse the repository at this point in the history
… test

Fixes #5972
  • Loading branch information
starpit committed Oct 13, 2020
1 parent 9335063 commit 419dcac
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions plugins/plugin-s3/src/test/core/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ if (process.env.NEEDS_MINIO) {
}
const copyToS3 = (bucketName: string, specifiedDest?: string) => {
it(`should copy a file ->TO the bucket ${bucketName}`, () =>
CLI.command(`cp ${README_LOCAL_PATH} /s3/${PROVIDER}/${bucketName}` + (specifiedDest ? `/${specifiedDest}` : ''), this.app)
CLI.command(
`cp ${README_LOCAL_PATH} /s3/${PROVIDER}/${bucketName}` + (specifiedDest ? `/${specifiedDest}` : ''),
this.app
)
.then(ReplExpect.okWithString('Created object'))
.catch(Common.oops(this, true)))
}
const multiCopyToS3 = (bucketName: string, specifiedDest?: string) => {
it(`should copy a file1, file2 ->TO the bucket ${bucketName}`, () =>
CLI.command(
`cp ${README_LOCAL_PATH} ${PJSON_LOCAL_PATH} /s3/${PROVIDER}/${bucketName}` + (specifiedDest ? `/${specifiedDest}` : ''),
`cp ${README_LOCAL_PATH} ${PJSON_LOCAL_PATH} /s3/${PROVIDER}/${bucketName}` +
(specifiedDest ? `/${specifiedDest}` : ''),
this.app
)
.then(ReplExpect.okWithString('Created objects'))
Expand Down Expand Up @@ -141,6 +145,9 @@ if (process.env.NEEDS_MINIO) {
{
const bucketName = `kuitest-${v4()}`

// see https://github.com/IBM/kui/issues/5972
it('should sleep', () => new Promise(resolve => setTimeout(resolve, 5000)))

mkdir(bucketName)
ls(bucketName) // ls /s3/${PROVIDER}, expect bucketName
multiCopyToS3(bucketName)
Expand Down

0 comments on commit 419dcac

Please sign in to comment.