mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-23 10:42:20 +08:00
test logic update
This commit is contained in:
parent
0569358cbd
commit
eda5779a99
2 changed files with 3 additions and 4 deletions
|
|
@ -1 +0,0 @@
|
|||
10.0.0.1 node-4bukt.skynet
|
||||
|
|
@ -19,12 +19,12 @@ func TestCreateEgressGateway(t *testing.T) {
|
|||
t.Run("NoNodes", func(t *testing.T) {
|
||||
node, err := logic.CreateEgressGateway(gateway)
|
||||
assert.Equal(t, models.Node{}, node)
|
||||
assert.EqualError(t, err, "unable to get record key")
|
||||
assert.EqualError(t, err, "could not find any records")
|
||||
})
|
||||
t.Run("Success", func(t *testing.T) {
|
||||
testnode := createTestNode()
|
||||
gateway.NetID = "skynet"
|
||||
gateway.NodeID = testnode.MacAddress
|
||||
gateway.NodeID = testnode.ID
|
||||
|
||||
node, err := logic.CreateEgressGateway(gateway)
|
||||
assert.Nil(t, err)
|
||||
|
|
@ -43,7 +43,7 @@ func TestDeleteEgressGateway(t *testing.T) {
|
|||
gateway.Interface = "eth0"
|
||||
gateway.Ranges = []string{"10.100.100.0/24"}
|
||||
gateway.NetID = "skynet"
|
||||
gateway.NodeID = testnode.MacAddress
|
||||
gateway.NodeID = testnode.ID
|
||||
t.Run("Success", func(t *testing.T) {
|
||||
node, err := logic.CreateEgressGateway(gateway)
|
||||
assert.Nil(t, err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue