Skip to content

Commit

Permalink
Expand IsEnterprise test cases
Browse files Browse the repository at this point in the history
Adding API hosts to TestIsEnterprise to ensure that normalized hosts work as expected.
  • Loading branch information
andyfeller committed Apr 29, 2024
1 parent 9afca84 commit 8a3c02a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/auth/auth_test.go
Expand Up @@ -237,11 +237,21 @@ func TestIsEnterprise(t *testing.T) {
host: "github.com",
wantOut: false,
},
{
name: "github API",
host: "api.github.com",
wantOut: false,
},
{
name: "localhost",
host: "github.localhost",
wantOut: false,
},
{
name: "localhost API",
host: "api.github.localhost",
wantOut: false,
},
{
name: "enterprise",
host: "mygithub.com",
Expand All @@ -252,6 +262,11 @@ func TestIsEnterprise(t *testing.T) {
host: "tenant.ghe.com",
wantOut: false,
},
{
name: "tenant API",
host: "api.tenant.ghe.com",
wantOut: false,
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 8a3c02a

Please sign in to comment.