浏览代码

rm-gocheck: ErrorMatches -> assert.ErrorContains

sed -E -i 's#\bassert\.Assert\(c, (.*), check\.ErrorMatches,#assert.ErrorContains(c, \1,#g' \
-- "pkg/discovery/kv/kv_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit a7d144fb347b0169efa847b7551beb8984634f5b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Tibor Vass 5 年之前
父节点
当前提交
99deded542
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/discovery/kv/kv_test.go

+ 1 - 1
pkg/discovery/kv/kv_test.go

@@ -230,7 +230,7 @@ func (ds *DiscoverySuite) TestWatch(c *testing.T) {
 	ch, errCh := d.Watch(stopCh)
 	ch, errCh := d.Watch(stopCh)
 
 
 	// It should fire an error since the first WatchTree call failed.
 	// It should fire an error since the first WatchTree call failed.
-	assert.Assert(c, <-errCh, check.ErrorMatches, "test error")
+	assert.ErrorContains(c, <-errCh, "test error")
 	// We have to drain the error channel otherwise Watch will get stuck.
 	// We have to drain the error channel otherwise Watch will get stuck.
 	go func() {
 	go func() {
 		for range errCh {
 		for range errCh {