frostfs-api-go-pogpp/service/role_test.go

24 lines
409 B
Go
Raw Normal View History

2019-11-18 13:34:06 +00:00
package service
import (
"testing"
2019-11-18 16:22:08 +00:00
"github.com/stretchr/testify/require"
2019-11-18 13:34:06 +00:00
)
func TestNodeRole_String(t *testing.T) {
tests := []struct {
nt NodeRole
want string
}{
{want: "Unknown"},
{nt: StorageNode, want: "StorageNode"},
{nt: InnerRingNode, want: "InnerRingNode"},
}
for _, tt := range tests {
t.Run(tt.want, func(t *testing.T) {
require.Equal(t, tt.want, tt.nt.String())
})
}
}