allow localhost hostnames for artifact checks

This commit is contained in:
Rob Herley authored and GitHub committed 2024-07-03 16:55:53 +00:00
1 parent 0df831db2f
commit 8c7a920210
4 files changed
+13 -4

No files matched your search

+5
View File
@@ -20,6 +20,11 @@ describe('isGhes', () => {
expect(config.isGhes()).toBe(false)
})
it('should return false when the request domain ends with .localhost', () => {
process.env.GITHUB_SERVER_URL = 'https://github.localhost'
expect(config.isGhes()).toBe(false)
})
it('should return false when the request domain is specific to an enterprise', () => {
process.env.GITHUB_SERVER_URL = 'https://my-enterprise.github.com'
expect(config.isGhes()).toBe(true)