forked from TrueCloudLab/frostfs-api-go
bootstrap: implement SignedDataSource on Request message
This commit is contained in:
parent
3fb293543f
commit
9327c5f816
6 changed files with 226 additions and 5 deletions
39
bootstrap/types_test.go
Normal file
39
bootstrap/types_test.go
Normal file
|
@ -0,0 +1,39 @@
|
|||
package bootstrap
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestRequestGettersSetters(t *testing.T) {
|
||||
t.Run("type", func(t *testing.T) {
|
||||
rt := NodeType(1)
|
||||
m := new(Request)
|
||||
|
||||
m.SetType(rt)
|
||||
|
||||
require.Equal(t, rt, m.GetType())
|
||||
})
|
||||
|
||||
t.Run("state", func(t *testing.T) {
|
||||
st := Request_State(1)
|
||||
m := new(Request)
|
||||
|
||||
m.SetState(st)
|
||||
|
||||
require.Equal(t, st, m.GetState())
|
||||
})
|
||||
|
||||
t.Run("info", func(t *testing.T) {
|
||||
info := NodeInfo{
|
||||
Address: "some address",
|
||||
}
|
||||
|
||||
m := new(Request)
|
||||
|
||||
m.SetInfo(info)
|
||||
|
||||
require.Equal(t, info, m.GetInfo())
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue