MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / TestProcessCookieNoCookieError

Function TestProcessCookieNoCookieError

oauthproxy_test.go:949–960  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

947}
948
949func TestProcessCookieNoCookieError(t *testing.T) {
950 pcTest, err := NewProcessCookieTestWithDefaults()
951 if err != nil {
952 t.Fatal(err)
953 }
954
955 session, err := pcTest.LoadCookiedSession()
956 assert.Error(t, err, "cookie \"_oauth2_proxy\" not present")
957 if session != nil {
958 t.Errorf("expected nil session. got %#v", session)
959 }
960}
961
962func TestProcessCookieRefreshNotSet(t *testing.T) {
963 pcTest, err := NewProcessCookieTestWithOptionsModifiers(func(opts *options.Options) {

Callers

nothing calls this directly

Calls 3

ErrorMethod · 0.65
LoadCookiedSessionMethod · 0.45

Tested by

no test coverage detected