diff --git a/NOTICE.txt b/NOTICE.txt index 9ef73db8b986..146b29e3e38d 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -21675,22 +21675,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -Dependency : github.com/pierrre/gotestcover -Version: v0.0.0-20160517101806-924dca7d15f0 -Licence type (autodetected): MIT --------------------------------------------------------------------------------- - -Contents of probable licence file $GOMODCACHE/github.com/pierrre/gotestcover@v0.0.0-20160517101806-924dca7d15f0/LICENSE: - -Copyright (C) 2015 Pierre Durand - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------------- Dependency : github.com/pkg/errors Version: v0.9.1 diff --git a/go.mod b/go.mod index ac6d0bde23d1..b9d6fc621d67 100644 --- a/go.mod +++ b/go.mod @@ -106,7 +106,6 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/olekukonko/tablewriter v0.0.5 github.com/osquery/osquery-go v0.0.0-20231108163517-e3cde127e724 - github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 diff --git a/go.sum b/go.sum index 06867e8e3ac0..9a1c36d3f843 100644 --- a/go.sum +++ b/go.sum @@ -789,8 +789,6 @@ github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOTh github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0 h1:i5VIxp6QB8oWZ8IkK8zrDgeT6ORGIUeiN+61iETwJbI= -github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0/go.mod h1:4xpMLz7RBWyB+ElzHu8Llua96TRCB3YwX+l5EP1wmHk= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/libbeat/scripts/Makefile b/libbeat/scripts/Makefile index 4360aa0c1927..57f153c0a722 100755 --- a/libbeat/scripts/Makefile +++ b/libbeat/scripts/Makefile @@ -70,8 +70,6 @@ BUILD_DIR?=$(shell pwd)/build PKG_BUILD_DIR?=$(BUILD_DIR)/package${PKG_SUFFIX} PKG_UPLOAD_DIR?=$(BUILD_DIR)/upload COVERAGE_DIR?=${BUILD_DIR}/coverage -COVERAGE_TOOL?=${BEAT_GOPATH}/bin/gotestcover -COVERAGE_TOOL_REPO?=github.com/pierrre/gotestcover TESTIFY_TOOL_REPO?=github.com/stretchr/testify/assert NOW=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') GOBUILD_FLAGS?=-ldflags "-X github.com/elastic/beats/libbeat/version.buildTime=$(NOW) -X github.com/elastic/beats/libbeat/version.commit=$(COMMIT_ID)" @@ -188,16 +186,13 @@ ci: ## @build Shortcut for continuous integration. This should always run befor .PHONY: prepare-tests prepare-tests: mkdir -p ${COVERAGE_DIR} - # gotestcover is needed to fetch coverage for multiple packages - go ${INSTALL_CMD} ${COVERAGE_TOOL_REPO} # testify is needed for unit and integration tests go ${INSTALL_CMD} ${TESTIFY_TOOL_REPO} .PHONY: unit-tests unit-tests: ## @testing Runs the unit tests with coverage. Race is not enabled for unit tests because tests run much slower. unit-tests: prepare-tests - GOFLAGS="${INSTALL_FLAG}" \ - $(COVERAGE_TOOL) $(RACE) -coverprofile=${COVERAGE_DIR}/unit.cov ${GOPACKAGES} + echo 'mode: atomic' > "${COVERAGE_DIR}/unit.cov" && echo "${GOPACKAGES}" | xargs -I{} sh -c 'GOFLAGS="${INSTALL_FLAG}" go test $(RACE) -covermode=atomic -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> ${COVERAGE_DIR}/unit.cov' && rm coverage.tmp .PHONY: unit unit: ## @testing Runs the unit tests without coverage reports. @@ -207,8 +202,7 @@ unit: ## @testing Runs the unit tests without coverage reports. integration-tests: ## @testing Run integration tests. Unit tests are run as part of the integration tests. integration-tests: prepare-tests mage rm -f docker-compose.yml.lock - GOFLAGS="${INSTALL_FLAG}" \ - $(COVERAGE_TOOL) -tags=integration $(RACE) -coverprofile=${COVERAGE_DIR}/integration.cov ${GOPACKAGES} + echo 'mode: atomic' > "${COVERAGE_DIR}/integration.cov" && echo "${GOPACKAGES}" | xargs -I{} sh -c 'GOFLAGS="${INSTALL_FLAG}" go test $(RACE) -tags=integration -covermode=atomic -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> ${COVERAGE_DIR}/integration.cov' && rm coverage.tmp .PHONY: integration-tests-environment integration-tests-environment: ## @testing Runs the integration inside a virtual environment. This can be run on any docker-machine (local, remote) diff --git a/tools/tools.go b/tools/tools.go index fe36ef49adea..6ac5ec766911 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -24,7 +24,6 @@ package tools import ( _ "github.com/magefile/mage" - _ "github.com/pierrre/gotestcover" _ "github.com/stretchr/testify/assert" _ "github.com/tsg/go-daemon" _ "golang.org/x/tools/cmd/goimports"