frostfs-api-go/service/role_test.go
2019-11-21 13:10:57 +03:00

23 lines
409 B
Go

package service
import (
"testing"
"github.com/stretchr/testify/require"
)
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())
})
}
}