Skip to content

Commit

Permalink
fix errcheck issue for extension observer (#11462)
Browse files Browse the repository at this point in the history
Signed-off-by: Ziqi Zhao <[email protected]>
  • Loading branch information
fatsheep9146 committed Jun 23, 2022
1 parent 10693a3 commit 50ce9d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extension/observer/ecsobserver/internal/errctx/value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// nolint:errcheck
package errctx

import (
Expand All @@ -25,7 +24,7 @@ import (
func TestWithValue(t *testing.T) {
assert.Nil(t, WithValue(nil, "a", "b"))
assert.Panics(t, func() {
WithValue(fmt.Errorf("base"), "", nil)
_ = WithValue(fmt.Errorf("base"), "", nil)
})

e1 := WithValue(fmt.Errorf("base"), "a", "b")
Expand All @@ -49,7 +48,7 @@ func TestWithValue(t *testing.T) {
func TestWithValues(t *testing.T) {
assert.Nil(t, WithValues(nil, map[string]interface{}{"a": "b"}))
assert.Panics(t, func() {
WithValues(fmt.Errorf("base"), map[string]interface{}{"": "123"})
_ = WithValues(fmt.Errorf("base"), map[string]interface{}{"": "123"})
})

e1 := WithValues(fmt.Errorf("base"), map[string]interface{}{"a": "b", "c": 123})
Expand Down

0 comments on commit 50ce9d7

Please sign in to comment.