package envoyconfig import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "github.com/pomerium/pomerium/config" configpb "github.com/pomerium/pomerium/pkg/grpc/config" ) func Test_buildLocalReplyConfig(t *testing.T) { b := Builder{} opts := config.NewDefaultOptions() opts.BrandingOptions = &configpb.Settings{ LogoUrl: proto.String("http://example.com/my%20branding%20logo.png"), ErrorMessageFirstParagraph: proto.String("It's 100% broken."), } lrc, err := b.buildLocalReplyConfig(opts) require.NoError(t, err) tmpl := string(lrc.Mappers[0].GetBodyFormatOverride().GetTextFormatSource().GetInlineBytes()) assert.Equal(t, `