You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/23 08:56:11 UTC

[GitHub] [apisix-dashboard] membphis commented on a change in pull request #847: fix: nodes format not works

membphis commented on a change in pull request #847:
URL: https://github.com/apache/apisix-dashboard/pull/847#discussion_r528547336



##########
File path: api/internal/core/entity/format_test.go
##########
@@ -23,19 +23,60 @@ import (
 	"github.com/stretchr/testify/assert"
 )
 
-func TestConsumer(t *testing.T) {
-	nodesStr := `{
-    "127.0.0.1:8080": 1
-  }`
-	nodesMap := map[string]float64{}
-	err := json.Unmarshal([]byte(nodesStr), &nodesMap)
+func TestNodesFormat(t *testing.T) {
+	// route data saved in ETCD
+	routeStr := `{
+        "uris": ["/*"],
+        "upstream": {
+            "type": "roundrobin",
+            "nodes": [{
+                "host": "127.0.0.1",
+                "port": 80,
+                "weight": 0
+            }]
+        }
+    }`

Review comment:
       bad indentation




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org