import (
"errors"
+ "fmt"
"io/ioutil"
"net"
"net/http"
"os"
"time"
- "fmt"
mdcloggo "gerrit.o-ran-sc.org/r/com/golog.git"
)
if ok {
logger.Info("Using appmgrdomain %s", appmgrDomain)
} else {
- pltnamespace := os.Getenv("PLT_NAMESPACE")
- if pltnamespace == "" {
- pltnamespace = "ricplt"
- }
- appmgrDomain = fmt.Sprintf("service-%s-appmgr-http.%s.svc.cluster.local",pltnamespace, pltnamespace)
+ pltnamespace := os.Getenv("PLT_NAMESPACE")
+ if pltnamespace == "" {
+ pltnamespace = "ricplt"
+ }
+ appmgrDomain = fmt.Sprintf("service-%s-appmgr-http.%s.svc.cluster.local", pltnamespace, pltnamespace)
logger.Info("Using default appmgrdomain %s", appmgrDomain)
}
vesmgr.chXAppSubscriptions = make(chan subscriptionNotification)
"net/http"
"net/url"
"os"
+ "sync"
"testing"
"time"
suite.Suite
listener net.Listener
xAppMgrFunc do
+ mu sync.Mutex
}
// suite setup creates the HTTP server
http.HandleFunc(url, func(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "GET":
+ suite.mu.Lock()
suite.xAppMgrFunc(w)
+ suite.mu.Unlock()
}
})
http.Serve(listener, nil)