Commit a7b01505 authored by Yann Garcia's avatar Yann Garcia
Browse files

Create dummy client for VIS tests; big fixed in...

Create dummy client for VIS tests; big fixed in model_meas_rep_ue_notification_new_radio_meas_info.go; Validate UT tests
parent dbf2bcdd
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import (
	dataModel "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model"
	gc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-cache"
	log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger"
	met "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics"
	/*met "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics"*/
	mod "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model"
	mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq"
	sam "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-swagger-api-mgr"
@@ -30,9 +30,10 @@ import (

const moduleName string = "meep-dai-sbi"

var metricStore *met.MetricStore
var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379"
var influxAddr string = "http://meep-influxdb.default.svc.cluster.local:8086"
// TODO See vis-sbi.go
//var metricStore *met.MetricStore
//var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379"
//var influxAddr string = "http://meep-influxdb.default.svc.cluster.local:8086"

type AppInfoSbi struct {
	Name         string
+1 −2
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ var sbxCtrlUrl string = "http://meep-sandbox-ctrl"

// No Subscriptions


var DAI_DB = 0

var rc *redis.Connector
+1 −3
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import (
	"github.com/gorilla/mux"
)


//const INITIAL = 0
//const UPDATED = 1

@@ -576,7 +575,6 @@ func TestAppListGET(t *testing.T) {
	terminateScenario()
}


func initializeVars() {
	mod.DbAddress = redisTestAddr
	redisAddr = redisTestAddr
+10 −4
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import (
	"net/http"
	"sort"
	"strconv"
	"strings"
	"time"

	dataModel "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model"
@@ -59,7 +60,6 @@ func resetAutomation() {
}

func setAutomation(automationType string, state bool) (err error) {

	// Validate automation type
	if _, found := ge.automation[automationType]; !found {
		return errors.New("Automation type not found")
@@ -146,7 +146,6 @@ func runAutomation() {
	}

	// Mobility
	log.Info("runAutomation: ge.automation[AutoTypeMobility]: ", ge.automation[AutoTypeMobility])
	if ge.automation[AutoTypeMobility] {
		runAutoMobility(ueMap)
	}
@@ -446,8 +445,12 @@ func geGetAutomationState(w http.ResponseWriter, r *http.Request) {

func geGetAutomationStateByName(w http.ResponseWriter, r *http.Request) {
	// Get automation type from request path parameters
	vars := mux.Vars(r)
	vars := mux.Vars(r) //returns map[] https://stackoverflow.com/questions/31371111/mux-vars-not-working
	automationType := vars["type"]
	if automationType == "" {
		u := strings.Split(string(r.URL.Path), "/")
		automationType = u[2]
	}

	// Get automation state
	var automationState AutomationState
@@ -478,8 +481,11 @@ func geGetAutomationStateByName(w http.ResponseWriter, r *http.Request) {
func geSetAutomationStateByName(w http.ResponseWriter, r *http.Request) {
	// Get automation type from request path parameters
	vars := mux.Vars(r) //returns map[] https://stackoverflow.com/questions/31371111/mux-vars-not-working
	log.Info("geSetAutomationStateByName: vars: ", vars)
	automationType := vars["type"]
	if automationType == "" {
		u := strings.Split(string(r.URL.Path), "/")
		automationType = u[2]
	}

	// Retrieve requested state from query parameters
	query := r.URL.Query()
+1 −1
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@ const moduleName = "meep-gis-engine"

var redisAddr = "meep-redis-master.default.svc.cluster.local:6379"
var influxAddr = "http://meep-influxdb.default.svc.cluster.local:8086"
var sboxCtrlBasepath = "http://meep-sandbox-ctrl/sandbox-ctrl/v1"

const sboxCtrlBasepath = "http://meep-sandbox-ctrl/sandbox-ctrl/v1"
const postgisUser = "postgres"
const postgisPwd = "pwd"

Loading