Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 984793a

Browse files
committed
Fix impersonation requests and update Makefile
Signed-off-by: JoshVanL <[email protected]>
1 parent c880d38 commit 984793a

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

Makefile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ clean: ## clean up created files
7474
rm -rf \
7575
$(BINDIR) \
7676
pkg/mocks/authenticator.go \
77+
demo/bin \
7778
test/e2e/framework/issuer/bin
7879

7980
verify: depend verify_boilerplate go_fmt go_vet go_lint ## verify code and mod
@@ -87,21 +88,6 @@ test: generate verify ## run all go tests
8788
e2e: ## run end to end tests
8889
KUBE_OIDC_PROXY_ROOT_PATH="$$(pwd)" go test -timeout 30m -v ./test/e2e/suite/.
8990

90-
#e2e-1.15: build ## run end to end tests for kubernetes version 1.15
91-
# KUBE_OIDC_PROXY_NODE_IMAGE=1.15.0 go test ./pkg/e2e/. -v --count=1
92-
#
93-
#e2e-1.14: build ## run end to end tests for kubernetes version 1.14
94-
# KUBE_OIDC_PROXY_NODE_IMAGE=1.14.3 go test ./pkg/e2e/. -v --count=1
95-
#
96-
#e2e-1.13: build ## run end to end tests for kubernetes version 1.13
97-
# KUBE_OIDC_PROXY_NODE_IMAGE=1.13.7 go test ./pkg/e2e/. -v --count=1
98-
#
99-
#e2e-1.12: build ## run end to end tests for kubernetes version 1.12
100-
# KUBE_OIDC_PROXY_NODE_IMAGE=1.12.8 go test ./pkg/e2e/. -v --count=1
101-
#
102-
#e2e-1.11: build ## run end to end tests for kubernetes version 1.11
103-
# KUBE_OIDC_PROXY_NODE_IMAGE=1.11.10 go test ./pkg/e2e/. -v --count=1
104-
10591
build: generate ## build kube-oidc-proxy
10692
CGO_ENABLED=0 go build -ldflags '-w $(shell hack/version-ldflags.sh)' -o ./bin/kube-oidc-proxy ./cmd/.
10793

test/e2e/suite/cases/impersonation/impersonation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var _ = framework.CasesDescribe("Impersonation", func() {
2222
It("should error at proxy when impersonation enabled and impersonation is attempted on a request", func() {
2323
By("Impersonating as a user")
2424
tryImpersonationClient(f, rest.ImpersonationConfig{
25-
UserName: "user@example.com",
25+
UserName: "foo@example.com",
2626
})
2727

2828
By("Impersonating as a group")
@@ -90,13 +90,13 @@ func tryImpersonationClient(f *framework.Framework, impConfig rest.Impersonation
9090
Expect(err).NotTo(HaveOccurred())
9191
}
9292

93-
expRespBody := "Impersonation requests are disabled when using kube-oidc-proxy (get pods)"
93+
expRespBody := "Impersonation requests are disabled when using kube-oidc-proxy"
9494
resp := kErr.Status().Details.Causes[0].Message
9595

9696
// check body and status code the token was rejected
9797
if int(kErr.Status().Code) != http.StatusForbidden ||
9898
resp != expRespBody {
99-
Expect(fmt.Errorf("expected status code %d with body %q, got= %+v",
99+
Expect(fmt.Errorf("expected status code %d with body %q, got=%s",
100100
http.StatusForbidden, expRespBody, kErr)).NotTo(HaveOccurred())
101101
}
102102
}

0 commit comments

Comments
 (0)