add to proto

This commit is contained in:
Caleb Doxsey 2023-11-07 16:42:02 -07:00
parent a94fe44175
commit 46ebdb858c
4 changed files with 185 additions and 161 deletions

View file

@ -24,6 +24,7 @@ import (
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"
"github.com/pomerium/csrf"
"github.com/pomerium/pomerium/internal/identity/oauth/apple"
@ -957,6 +958,14 @@ func TestOptions_ApplySettings(t *testing.T) {
options.ApplySettings(ctx, certsIndex, settings)
assert.Len(t, options.CertificateFiles, 2, "should prevent adding duplicate certificates")
})
t.Run("pass_identity_headers", func(t *testing.T) {
options := NewDefaultOptions()
options.ApplySettings(ctx, nil, &config.Settings{
PassIdentityHeaders: proto.Bool(true),
})
assert.Equal(t, proto.Bool(true), options.PassIdentityHeaders)
})
}
func TestOptions_GetSetResponseHeaders(t *testing.T) {