mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-27 15:37:21 -04:00
peer: save PublicIP instead of publicEndpoint / add multi-coord gRPCs
This commit is contained in:
parent
55a1aa783f
commit
f0e35a43d4
31 changed files with 1216 additions and 666 deletions
|
@ -123,22 +123,22 @@ func TestStoreWrapperPeerInterface(t *testing.T) {
|
|||
internalIP := "10.118.2.0"
|
||||
|
||||
validPeer := peer.Peer{
|
||||
PublicEndpoint: ip,
|
||||
VPNPubKey: key[:],
|
||||
VPNIP: internalIP,
|
||||
PublicIP: ip,
|
||||
VPNPubKey: key[:],
|
||||
VPNIP: internalIP,
|
||||
}
|
||||
require.NoError(stwrapper.PutPeer(validPeer))
|
||||
data, err := stwrapper.GetPeers()
|
||||
require.NoError(err)
|
||||
require.Equal(1, len(data))
|
||||
assert.Equal(ip, data[0].PublicEndpoint)
|
||||
assert.Equal(ip, data[0].PublicIP)
|
||||
assert.Equal(key[:], data[0].VPNPubKey)
|
||||
assert.Equal(internalIP, data[0].VPNIP)
|
||||
|
||||
invalidPeer := peer.Peer{
|
||||
PublicEndpoint: ip,
|
||||
VPNPubKey: key[:],
|
||||
VPNIP: "",
|
||||
PublicIP: ip,
|
||||
VPNPubKey: key[:],
|
||||
VPNIP: "",
|
||||
}
|
||||
assert.Error(stwrapper.PutPeer(invalidPeer))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue