From 8160e9ebe20f46fb3ffed3ced08e493e4b895bf8 Mon Sep 17 00:00:00 2001 From: Benjamin Wang Date: Thu, 30 Jun 2022 14:11:54 +0800 Subject: [PATCH] disable test cases on certificate-based authentication which isn't supported by gRPC proxy. Signed-off-by: Benjamin Wang --- tests/e2e/ctl_v3_auth_no_proxy_test.go | 33 ++++++++++++++++++++++++++ tests/e2e/ctl_v3_auth_test.go | 9 +------ 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 tests/e2e/ctl_v3_auth_no_proxy_test.go diff --git a/tests/e2e/ctl_v3_auth_no_proxy_test.go b/tests/e2e/ctl_v3_auth_no_proxy_test.go new file mode 100644 index 000000000..06bcc2fd0 --- /dev/null +++ b/tests/e2e/ctl_v3_auth_no_proxy_test.go @@ -0,0 +1,33 @@ +// Copyright 2022 The etcd Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// These tests depends on certificate-based authentication that is NOT supported +// by gRPC proxy. +// +build !cluster_proxy + +package e2e + +import ( + "testing" +) + +func TestCtlV3AuthCertCN(t *testing.T) { + testCtl(t, authTestCertCN, withCfg(*newConfigClientTLSCertAuth())) +} +func TestCtlV3AuthCertCNAndUsername(t *testing.T) { + testCtl(t, authTestCertCNAndUsername, withCfg(*newConfigClientTLSCertAuth())) +} +func TestCtlV3AuthCertCNAndUsernameNoPassword(t *testing.T) { + testCtl(t, authTestCertCNAndUsernameNoPassword, withCfg(*newConfigClientTLSCertAuth())) +} diff --git a/tests/e2e/ctl_v3_auth_test.go b/tests/e2e/ctl_v3_auth_test.go index 60e99b510..5e5640b69 100644 --- a/tests/e2e/ctl_v3_auth_test.go +++ b/tests/e2e/ctl_v3_auth_test.go @@ -37,7 +37,6 @@ func TestCtlV3AuthMemberRemove(t *testing.T) { testCtl(t, authTestMemberRemove, withQuorum(), withNoStrictReconfig()) } func TestCtlV3AuthMemberUpdate(t *testing.T) { testCtl(t, authTestMemberUpdate) } -func TestCtlV3AuthCertCN(t *testing.T) { testCtl(t, authTestCertCN, withCfg(configClientTLSCertAuth)) } func TestCtlV3AuthRevokeWithDelete(t *testing.T) { testCtl(t, authTestRevokeWithDelete) } func TestCtlV3AuthInvalidMgmt(t *testing.T) { testCtl(t, authTestInvalidMgmt) } func TestCtlV3AuthFromKeyPerm(t *testing.T) { testCtl(t, authTestFromKeyPerm) } @@ -64,13 +63,7 @@ func TestCtlV3AuthEndpointHealth(t *testing.T) { } func TestCtlV3AuthSnapshot(t *testing.T) { testCtl(t, authTestSnapshot) } func TestCtlV3AuthSnapshotJWT(t *testing.T) { testCtl(t, authTestSnapshot, withCfg(configJWT)) } -func TestCtlV3AuthCertCNAndUsername(t *testing.T) { - testCtl(t, authTestCertCNAndUsername, withCfg(configClientTLSCertAuth)) -} -func TestCtlV3AuthJWTExpire(t *testing.T) { testCtl(t, authTestJWTExpire, withCfg(configJWT)) } -func TestCtlV3AuthCertCNAndUsernameNoPassword(t *testing.T) { - testCtl(t, authTestCertCNAndUsernameNoPassword, withCfg(configClientTLSCertAuth)) -} +func TestCtlV3AuthJWTExpire(t *testing.T) { testCtl(t, authTestJWTExpire, withCfg(configJWT)) } func authEnableTest(cx ctlCtx) { if err := authEnable(cx); err != nil {