yangbor commented on issue #328: [SCB-479] Add proxy to service-center in 
frontend
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/328#issuecomment-381937397
 
 
   The UT succeeded on local build but the following case failed on travis. 
   Need investigation.
   
   Update: This test is Service-Center only and not related to frontend.  The 
failed case is:
   ```
                        By("Test Get All Services in SC", func() {
                                It("test valid scenario", func() {
                                        getServiceName(serviceId)
                                        req, _ := http.NewRequest(GET, 
SCURL+GETALLSERVICE, nil)
                                        req.Header.Set("X-Domain-Name", 
"default")
                                        resp, _ := scclient.Do(req)
                                        respbody, _ := ioutil.ReadAll(resp.Body)
                                        
Expect(resp.StatusCode).To(Equal(http.StatusOK))
                                        servicesStruct := 
map[string][]map[string]interface{}{}
                                        json.Unmarshal(respbody, 
&servicesStruct)
                                        foundMicroService := false
                                        for _, services := range 
servicesStruct["services"] {
                                                if services["serviceName"] == 
serviceName {
                                                        foundMicroService = true
                                                        break
                                                }
                                        }
                                        
Expect(foundMicroService).To(Equal(true))
                                })
   
                                It("test get all service with wrong domain 
name", func() {
                                        req, _ := http.NewRequest(GET, 
SCURL+GETALLSERVICE, nil)
                                        req.Header.Set("X-Domain-Name", 
"default1")
                                        resp, _ := scclient.Do(req)
                                        respbody, _ := ioutil.ReadAll(resp.Body)
                                        
Expect(resp.StatusCode).To(Equal(http.StatusOK))
                                        
Expect(strings.TrimSpace(string(respbody))).To(Equal("{}"))
                                })
                        })
   ```
   
   =============================
   • Failure [0.008 seconds]
   MicroService Api Test
   
/home/travis/gopath/src/github.com/apache/incubator-servicecomb-service-center/integration/microservices_test.go:522
     Testing MicroServices Functions
     
/home/travis/gopath/src/github.com/apache/incubator-servicecomb-service-center/integration/microservices_test.go:520
       Testing MicroService API's
       
/home/travis/gopath/src/github.com/apache/incubator-servicecomb-service-center/integration/microservices_test.go:519
         test valid scenario [It]
         
/home/travis/gopath/src/github.com/apache/incubator-servicecomb-service-center/integration/microservices_test.go:206
         Expected
             <bool>: false
         to equal
             <bool>: true
         
/home/travis/gopath/src/github.com/apache/incubator-servicecomb-service-center/integration/microservices_test.go:205

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to