proxy: remove unused handlers (#1317)

proxy: remove unused handlers

authenticate: remove unused references to refresh_token

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
bobby 2020-08-22 10:02:12 -07:00 committed by GitHub
parent 82deafee63
commit c1b3b45d12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 63 additions and 235 deletions

View file

@ -18,7 +18,7 @@ func TestDashboard(t *testing.T) {
t.Run("user dashboard", func(t *testing.T) {
client := testcluster.NewHTTPClient()
req, err := http.NewRequestWithContext(ctx, "GET", "https://httpdetails.localhost.pomerium.io/.pomerium", nil)
req, err := http.NewRequestWithContext(ctx, "GET", "https://httpdetails.localhost.pomerium.io/.pomerium/", nil)
if err != nil {
t.Fatal(err)
}
@ -31,6 +31,22 @@ func TestDashboard(t *testing.T) {
assert.Equal(t, http.StatusFound, res.StatusCode, "unexpected status code")
})
t.Run("dashboard strict slash redirect", func(t *testing.T) {
client := testcluster.NewHTTPClient()
req, err := http.NewRequestWithContext(ctx, "GET", "https://httpdetails.localhost.pomerium.io/.pomerium", nil)
if err != nil {
t.Fatal(err)
}
res, err := client.Do(req)
if !assert.NoError(t, err, "unexpected http error") {
return
}
defer res.Body.Close()
assert.Equal(t, http.StatusMovedPermanently, res.StatusCode, "unexpected status code")
})
t.Run("image asset", func(t *testing.T) {
client := testcluster.NewHTTPClient()