From 1b125300bb509628dabb7e69d3ad891fdfd3be05 Mon Sep 17 00:00:00 2001 From: James Blair Date: Thu, 30 Mar 2023 15:17:53 +1300 Subject: [PATCH] Remove nocov implementation for e2e spawn. Signed-off-by: James Blair --- tests/framework/e2e/etcd_spawn_cov.go | 57 ------------------------- tests/framework/e2e/etcd_spawn_nocov.go | 2 - 2 files changed, 59 deletions(-) delete mode 100644 tests/framework/e2e/etcd_spawn_cov.go diff --git a/tests/framework/e2e/etcd_spawn_cov.go b/tests/framework/e2e/etcd_spawn_cov.go deleted file mode 100644 index 05f4c0068..000000000 --- a/tests/framework/e2e/etcd_spawn_cov.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2017 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. - -//go:build cov - -package e2e - -import ( - "fmt" - "os" - "time" - - "go.etcd.io/etcd/client/pkg/v3/fileutil" - "go.etcd.io/etcd/tests/v3/framework/testutils" -) - -const noOutputLineCount = 2 // cov-enabled binaries emit PASS and coverage count lines - -var ( - coverDir = testutils.MustAbsPath(os.Getenv("COVERDIR")) -) - -func init() { - initBinPath = initBinPathCov - additionalArgs = additionalArgsCov -} - -func initBinPathCov(binDir string) binPath { - return binPath{ - Etcd: binDir + "/etcd_test", - EtcdLastRelease: binDir + "/etcd-last-release", - Etcdctl: binDir + "/etcdctl_test", - Etcdutl: binDir + "/etcdutl_test", - } -} - -func additionalArgsCov() ([]string, error) { - if !fileutil.Exist(coverDir) { - return nil, fmt.Errorf("could not find coverage folder: %s", coverDir) - } - covArgs := []string{ - fmt.Sprintf("-test.coverprofile=e2e.%v.coverprofile", time.Now().UnixNano()), - "-test.outputdir=" + coverDir, - } - return covArgs, nil -} diff --git a/tests/framework/e2e/etcd_spawn_nocov.go b/tests/framework/e2e/etcd_spawn_nocov.go index 62b4ff6c8..1a66183f9 100644 --- a/tests/framework/e2e/etcd_spawn_nocov.go +++ b/tests/framework/e2e/etcd_spawn_nocov.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !cov - package e2e const noOutputLineCount = 0 // regular binaries emit no extra lines