Skip to content
代码片段 群组 项目
未验证 提交 01c92b5c 编辑于 作者: Mikhail Mazurskiy's avatar Mikhail Mazurskiy
浏览文件

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.
上级 42397022
No related branches found
No related tags found
无相关合并请求
...@@ -147,7 +147,7 @@ testdata/scratch: ...@@ -147,7 +147,7 @@ testdata/scratch:
mkdir -p testdata/scratch mkdir -p testdata/scratch
.PHONY: verify .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 .PHONY: lint
lint: lint:
...@@ -165,11 +165,6 @@ detect-context: ...@@ -165,11 +165,6 @@ detect-context:
$(call message,Verify: $@) $(call message,Verify: $@)
_support/detect-context.sh _support/detect-context.sh
.PHONY: detect-assert
detect-assert:
$(call message,Verify: $@)
_support/detect-assert.sh
.PHONY: detect-external-tests .PHONY: detect-external-tests
detect-external-tests: detect-external-tests:
$(call message,Verify: $@) $(call message,Verify: $@)
......
#!/bin/sh
git grep 'testify/assert"' | \
grep -e '^[^:]*\.go' | \
awk '{
print "error: please use testify/require instead of testify/assert"
print
exit 1
}'
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册