mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 15:44:52 +08:00
test logic update
This commit is contained in:
parent
c6a2f2cb64
commit
edbce5547a
1 changed files with 3 additions and 3 deletions
|
@ -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