Migrate tests from "model/cluster_stats_test.go" to use testify (#12580)
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
467141ab69
Коммит
2f5949d05e
@@ -6,6 +6,8 @@ package model
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestClusterStatsJson(t *testing.T) {
|
func TestClusterStatsJson(t *testing.T) {
|
||||||
@@ -13,7 +15,5 @@ func TestClusterStatsJson(t *testing.T) {
|
|||||||
json := cluster.ToJson()
|
json := cluster.ToJson()
|
||||||
result := ClusterStatsFromJson(strings.NewReader(json))
|
result := ClusterStatsFromJson(strings.NewReader(json))
|
||||||
|
|
||||||
if cluster.Id != result.Id {
|
require.Equal(t, cluster.Id, result.Id, "Ids do not match")
|
||||||
t.Fatal("Ids do not match")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user