From 01c92b5cb23497a3c8af8bd5ab01b56406a1ff5f Mon Sep 17 00:00:00 2001 From: Mikhail Mazurskiy <mmazurskiy@gitlab.com> Date: Fri, 24 Nov 2023 13:06:01 +1100 Subject: [PATCH] Workhorse: allow testify/assert testify/require cannot be used in a goroutine, which might be the case in a test. See https://github.com/golang/go/issues/15758. --- workhorse/Makefile | 7 +------ workhorse/_support/detect-assert.sh | 9 --------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100755 workhorse/_support/detect-assert.sh diff --git a/workhorse/Makefile b/workhorse/Makefile index 267eaa47b579d..ec937c50c2ce6 100644 --- a/workhorse/Makefile +++ b/workhorse/Makefile @@ -147,7 +147,7 @@ testdata/scratch: mkdir -p testdata/scratch .PHONY: verify -verify: lint vet detect-context detect-assert detect-external-tests check-formatting staticcheck deps-check +verify: lint vet detect-context detect-external-tests check-formatting staticcheck deps-check .PHONY: lint lint: @@ -165,11 +165,6 @@ detect-context: $(call message,Verify: $@) _support/detect-context.sh -.PHONY: detect-assert -detect-assert: - $(call message,Verify: $@) - _support/detect-assert.sh - .PHONY: detect-external-tests detect-external-tests: $(call message,Verify: $@) diff --git a/workhorse/_support/detect-assert.sh b/workhorse/_support/detect-assert.sh deleted file mode 100755 index 351cef763b5e3..0000000000000 --- a/workhorse/_support/detect-assert.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -git grep 'testify/assert"' | \ - grep -e '^[^:]*\.go' | \ - awk '{ - print "error: please use testify/require instead of testify/assert" - print - exit 1 -}' -- GitLab