Skip to content

Commit 8a3c02a

Browse files
committed
Expand IsEnterprise test cases
Adding API hosts to TestIsEnterprise to ensure that normalized hosts work as expected.
1 parent 9afca84 commit 8a3c02a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pkg/auth/auth_test.go

+15
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,21 @@ func TestIsEnterprise(t *testing.T) {
237237
host: "github.com",
238238
wantOut: false,
239239
},
240+
{
241+
name: "github API",
242+
host: "api.github.com",
243+
wantOut: false,
244+
},
240245
{
241246
name: "localhost",
242247
host: "github.localhost",
243248
wantOut: false,
244249
},
250+
{
251+
name: "localhost API",
252+
host: "api.github.localhost",
253+
wantOut: false,
254+
},
245255
{
246256
name: "enterprise",
247257
host: "mygithub.com",
@@ -252,6 +262,11 @@ func TestIsEnterprise(t *testing.T) {
252262
host: "tenant.ghe.com",
253263
wantOut: false,
254264
},
265+
{
266+
name: "tenant API",
267+
host: "api.tenant.ghe.com",
268+
wantOut: false,
269+
},
255270
}
256271

257272
for _, tt := range tests {

0 commit comments

Comments
 (0)