@@ -2,8 +2,10 @@ package main
22
33import (
44 "errors"
5+ "fmt"
56 "io/ioutil"
67 "os"
8+ "strings"
79 "time"
810
911 "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
@@ -233,7 +235,7 @@ redirect_url="http://localhost:4180/oauth2/callback"
233235 configContent: testCoreConfig,
234236 alphaConfigContent: testAlphaConfig + ":",
235237 expectedOptions: func() *options.Options { return nil },
236− expectedErr: errors.New("failed to load alpha options: error unmarshalling config: error converting YAML to JSON: yaml: line 50: did not find expected key"),
238+ expectedErr: fmt.Errorf("failed to load alpha options: error unmarshalling config: error converting YAML to JSON: yaml: line %d: did not find expected key", strings.Count(testAlphaConfig, "\n")),
237239 }),
238240 Entry("with alpha configuration and bad core configuration", loadConfigurationTableInput{
239241 configContent: testCoreConfig + "unknown_field=\"something\"",