Skip to content

Commit

Permalink
add catalog to URI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Nov 15, 2024
1 parent 8c45baa commit 0278367
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions catalog/app/utils/PackageUri.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('utils/PackageUri', () => {
bucket: 'bucket-name',
name: 'quilt/test',
}),
).toBe('quilt+s3://bucket-name#package=quilt/test')
).toBe('quilt+s3://bucket-name#package=quilt/test&catalog=quilt-test')
})

it('should work for bucket, name and tag', () => {
Expand All @@ -145,7 +145,7 @@ describe('utils/PackageUri', () => {
name: 'quilt/test',
tag: 'latest',
}),
).toBe('quilt+s3://bucket-name#package=quilt/test:latest')
).toBe('quilt+s3://bucket-name#package=quilt/test:latest&catalog=quilt-test')
})

it('should work for bucket, name and hash', () => {
Expand All @@ -155,7 +155,7 @@ describe('utils/PackageUri', () => {
name: 'quilt/test',
hash: 'abc1',
}),
).toBe('quilt+s3://bucket-name#package=quilt/test@abc1')
).toBe('quilt+s3://bucket-name#package=quilt/test@abc1&catalog=quilt-test')
})

it('should work for bucket, name and path', () => {
Expand All @@ -165,7 +165,9 @@ describe('utils/PackageUri', () => {
name: 'quilt/test',
path: 'sub/path',
}),
).toBe('quilt+s3://bucket-name#package=quilt/test&path=sub%2Fpath')
).toBe(
'quilt+s3://bucket-name#package=quilt/test&path=sub%2Fpath&catalog=quilt-test',
)
})

it('should work for bucket, name, hash and path', () => {
Expand All @@ -176,7 +178,9 @@ describe('utils/PackageUri', () => {
hash: 'abc1',
path: 'sub/path',
}),
).toBe('quilt+s3://bucket-name#package=quilt/test@abc1&path=sub%2Fpath')
).toBe(
'quilt+s3://bucket-name#package=quilt/test@abc1&path=sub%2Fpath&catalog=quilt-test',
)
})
})
})

0 comments on commit 0278367

Please sign in to comment.