mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-11 08:07:38 +02:00
core/authorize: result denied improvements (#4952)
* core/authorize: result denied improvements * add authenticate robots.txt * fix tests
This commit is contained in:
parent
61a9bd7c6b
commit
55eb2fa3dc
8 changed files with 19 additions and 91 deletions
|
@ -16,20 +16,6 @@ import (
|
|||
"github.com/pomerium/pomerium/internal/urlutil"
|
||||
)
|
||||
|
||||
func TestProxy_RobotsTxt(t *testing.T) {
|
||||
proxy := Proxy{}
|
||||
req := httptest.NewRequest(http.MethodGet, "/robots.txt", nil)
|
||||
rr := httptest.NewRecorder()
|
||||
proxy.RobotsTxt(rr, req)
|
||||
if status := rr.Code; status != http.StatusOK {
|
||||
t.Errorf("handler returned wrong status code: got %v want %v", status, http.StatusOK)
|
||||
}
|
||||
expected := "User-agent: *\nDisallow: /"
|
||||
if rr.Body.String() != expected {
|
||||
t.Errorf("handler returned wrong body: got %v want %v", rr.Body.String(), expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProxy_SignOut(t *testing.T) {
|
||||
t.Parallel()
|
||||
tests := []struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue