Skip to content

Commit 48ccff1

Browse files
committed
this test was pulled in from a different branch and is unrelated
1 parent d47f52b commit 48ccff1

File tree

1 file changed

+0
-75
lines changed

1 file changed

+0
-75
lines changed

internal/proxy/oauthproxy_test.go

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,78 +1321,3 @@ func TestHTTPSRedirect(t *testing.T) {
13211321
})
13221322
}
13231323
}
1324-
1325-
// We want to test that allowed email addresses passed in
1326-
// via the upstream config will override those in the environment.
1327-
//func TestAllowedEmailAddressOverrides(t *testing.T) {
1328-
// testCases := []struct {
1329-
// name string
1330-
// environmentEmailAddresses string
1331-
// upstreamEmailAddresses []string
1332-
// expectedStatusCode int
1333-
// }{
1334-
// {
1335-
// name: "environmentEmailAddress set, upstreamEmailAddress unset",
1336-
// environmentEmailAddresses: "[email protected]",
1337-
// upstreamEmailAddresses: nil,
1338-
// expectedStatusCode: http.StatusOK,
1339-
// },
1340-
// {
1341-
// name: "environmentEmailAddress unset, upstreamEmailAddress set",
1342-
// environmentEmailAddresses: "",
1343-
// upstreamEmailAddresses: []string{"[email protected]"},
1344-
// expectedStatusCode: http.StatusOK,
1345-
// },
1346-
// {
1347-
// name: "environmentEmailAddress set, upstreamEmailAddress set",
1348-
// environmentEmailAddresses: "foo",
1349-
// upstreamEmailAddresses: []string{"[email protected]"},
1350-
/// expectedStatusCode: http.StatusOK,
1351-
// },
1352-
// {
1353-
// name: "environmentEmailAddress unset, upstreamEmailAddress unset",
1354-
// environmentEmailAddresses: "",
1355-
// upstreamEmailAddresses: nil,
1356-
// expectedStatusCode: http.StatusForbidden,
1357-
// },
1358-
// {
1359-
// name: "environmentEmailAddress valid, upstreamEmailAddress invalid",
1360-
// environmentEmailAddresses: "[email protected]",
1361-
// upstreamEmailAddresses: []string{"[email protected]"},
1362-
// expectedStatusCode: http.StatusForbidden,
1363-
/// },
1364-
// }
1365-
1366-
// for _, tc := range testCases {
1367-
// t.Run(tc.name, func(t *testing.T) {
1368-
1369-
// upstreamConfig := &UpstreamConfig{
1370-
// AllowedEmailAddresses: tc.upstreamEmailAddresses,
1371-
// }
1372-
1373-
// proxy, close := testNewOAuthProxy(t,
1374-
// setValidator(func(email string) bool {
1375-
// if email == tc.environmentEmailAddresses {
1376-
// return true
1377-
// }
1378-
// return false
1379-
//////// }),
1380-
//////// SetUpstreamConfig(upstreamConfig),
1381-
////// )
1382-
////// defer close()
1383-
////// t.Errorf("TESSSSSSSSSSSSSSSSSSST: %+v", proxy.upstreamConfig)
1384-
1385-
////// rec := httptest.NewRecorder()
1386-
////// req := httptest.NewRequest("GET", "https://localhost/", nil)
1387-
////// proxy.Handler().ServeHTTP(rec, req)
1388-
////// resp := rec.Result()
1389-
1390-
////// if tc.expectedStatusCode != resp.StatusCode {
1391-
//// t.Errorf("have: %v", resp.StatusCode)
1392-
// t.Errorf("want: %v", tc.expectedStatusCode)
1393-
// t.Fatalf("unexpected status code returned")
1394-
// }
1395-
// })
1396-
//
1397-
// }
1398-
//}

0 commit comments

Comments
 (0)