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 2021/10/02 09:29:15 UTC

[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #2149: feat: basic support Apache APISIX 2.10

nic-chen commented on a change in pull request #2149:
URL: https://github.com/apache/apisix-dashboard/pull/2149#discussion_r720654593



##########
File path: api/test/e2enew/service/service_test.go
##########
@@ -614,3 +615,126 @@ var _ = ginkgo.Describe("test service delete", func() {
 			ExpectStatus: http.StatusNotFound,
 		}))
 })
+
+var _ = ginkgo.Describe("test service with hosts", func() {
+	var createServiceBody map[string]interface{} = map[string]interface{}{
+		"name": "testservice",
+		"upstream": map[string]interface{}{
+			"type": "roundrobin",
+			"nodes": []map[string]interface{}{
+				{
+					"host":   base.UpstreamIp,
+					"port":   1980,
+					"weight": 1,
+				},
+			},
+		},
+		"hosts": []string{
+			"test.com",
+			"test1.com",
+		},
+	}
+	_createServiceBody, err := json.Marshal(createServiceBody)
+	gomega.Expect(err).To(gomega.BeNil())
+
+	var createRouteBody = map[string]interface{}{
+		"id":   "r1",
+		"name": "route1",
+		"uri":  "/hello",
+		"upstream": map[string]interface{}{
+			"type": "roundrobin",
+			"nodes": map[string]interface{}{
+				base.UpstreamIp + ":1980": 1,
+			},
+		},
+		"service_id": "s1",
+	}
+	_createRouteBody, err := json.Marshal(createRouteBody)
+	gomega.Expect(err).To(gomega.BeNil())
+
+	table.DescribeTable("test service with hosts",
+		func(tc func() base.HttpTestCase) {
+			base.RunTestCase(tc())
+		},
+		table.Entry("create service without plugin", func() base.HttpTestCase {

Review comment:
       should have a better desc




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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