mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 13:57:36 -08:00
use require instead of assert in custom marshal test
Signed-off-by: Callum Styan <callumstyan@gmail.com> Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
parent
4164eabac9
commit
ba53225efb
|
@ -15,7 +15,7 @@ package prompb
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestOptimizedMarshal(t *testing.T) {
|
||||
|
@ -75,15 +75,15 @@ func TestOptimizedMarshal(t *testing.T) {
|
|||
got = got[:0]
|
||||
// should be the same as the standard marshal
|
||||
expected, err := tt.m.Marshal()
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
got, err = tt.m.OptimizedMarshal(got)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, expected, got)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, expected, got)
|
||||
|
||||
// round trip
|
||||
m := &MinimizedWriteRequest{}
|
||||
assert.NoError(t, m.Unmarshal(got))
|
||||
assert.Equal(t, tt.m, m)
|
||||
require.NoError(t, m.Unmarshal(got))
|
||||
require.Equal(t, tt.m, m)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue