Browse Source

test logic update

0xdcarns 3 years ago
parent
commit
b793c248ec
2 changed files with 3 additions and 4 deletions
  1. 0 1
      controllers/config/dnsconfig/netmaker.hosts
  2. 3 3
      controllers/node_test.go

+ 0 - 1
controllers/config/dnsconfig/netmaker.hosts

@@ -1 +0,0 @@
-10.0.0.1         node-4bukt.skynet

+ 3 - 3
controllers/node_test.go

@@ -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)