test case for root url redirection

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2022-04-20 17:40:44 -04:00
parent 3d056418b9
commit addcdc49c2
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ func TestMakeHandler(t *testing.T) {
ExpectedStatus int ExpectedStatus int
ExpectedURL string ExpectedURL string
}{ }{
{
Name: "/",
Request: httptest.NewRequest("GET", "http://localhost:8080/", nil),
ExpectedStatus: http.StatusPermanentRedirect,
ExpectedURL: infoURL,
},
{ {
Name: "/v3/", Name: "/v3/",
Request: httptest.NewRequest("GET", "http://localhost:8080/v3/", nil), Request: httptest.NewRequest("GET", "http://localhost:8080/v3/", nil),