+ // Extract URL from _test-config.json file
+ fd, _ := os.Open(testConfigFile)
+ defer fd.Close()
+ fCfg := xdsconfig.FileConfig{}
+ if err := json.NewDecoder(fd).Decode(&fCfg); err != nil {
+ log.Fatalf("Cannot decode test config file %v : %v", testConfigFile, err)
+ }
+
+ if fCfg.HTTPPort == "" {
+ log.Fatalf("Cannot retrieve httpPort in test config file %v", testConfigFile)
+ }
+ prefixURL := "http://localhost:" + fCfg.HTTPPort
+
+ // Start HTTP client to send test commands