From addcdc49c23f231e9dcecdfc2081b9afe98cf6a0 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 20 Apr 2022 17:40:44 -0400 Subject: [PATCH] test case for root url redirection Signed-off-by: Davanum Srinivas --- cmd/archeio/app/handlers_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/archeio/app/handlers_test.go b/cmd/archeio/app/handlers_test.go index b95da58..5dedb08 100644 --- a/cmd/archeio/app/handlers_test.go +++ b/cmd/archeio/app/handlers_test.go @@ -32,6 +32,12 @@ func TestMakeHandler(t *testing.T) { ExpectedStatus int ExpectedURL string }{ + { + Name: "/", + Request: httptest.NewRequest("GET", "http://localhost:8080/", nil), + ExpectedStatus: http.StatusPermanentRedirect, + ExpectedURL: infoURL, + }, { Name: "/v3/", Request: httptest.NewRequest("GET", "http://localhost:8080/v3/", nil),