Commit 0b27e811 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

minor bug fixes

parent ad0ecc08
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -44,9 +44,9 @@ import (
	"github.com/gorilla/mux"
)

const moduleName = "meep-loc-serv"
const LocServBasePath = "location/v2/"
const locServKey = "loc-serv"
const logModuleLocServ = "meep-loc-serv"
const serviceName = "Location Service"
const defaultMepName = "global"
const defaultScopeOfLocality = "MEC_SYSTEM"
@@ -186,6 +186,7 @@ func Init() (err error) {
	log.Info("MEEP_INSTANCE_ID: ", instanceId)

	// Retrieve Instance Name from environment variable
	instanceName = moduleName
	instanceNameEnv := strings.TrimSpace(os.Getenv("MEEP_POD_NAME"))
	if instanceNameEnv != "" {
		instanceName = instanceNameEnv
@@ -3307,9 +3308,9 @@ func updateStoreName(storeName string) {
	if currentStoreName != storeName {
		currentStoreName = storeName

		logComponent := logModuleLocServ
		logComponent := moduleName
		if mepName != defaultMepName {
			logComponent = logModuleLocServ + "-" + mepName
			logComponent = moduleName + "-" + mepName
		}
		_ = httpLog.ReInit(logComponent, sandboxName, storeName, redisAddr, influxAddr)
	}
+4 −4
Original line number Diff line number Diff line
@@ -2894,7 +2894,7 @@ func TestUserSubscriptionNotification(t *testing.T) {
		t.Fatalf("Failed to create a store")
	}

	httpLog, err := metricStore.GetHttpMetric(logModuleLocServ, "TX", "", 1)
	httpLog, err := metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
@@ -3016,7 +3016,7 @@ func TestZoneSubscriptionNotification(t *testing.T) {
		t.Fatalf("Failed to create a store")
	}

	httpLog, err := metricStore.GetHttpMetric(logModuleLocServ, "TX", "", 1)
	httpLog, err := metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
@@ -3033,7 +3033,7 @@ func TestZoneSubscriptionNotification(t *testing.T) {

	updateScenario("mobility2")

	httpLog, err = metricStore.GetHttpMetric(logModuleLocServ, "TX", "", 1)
	httpLog, err = metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
@@ -3049,7 +3049,7 @@ func TestZoneSubscriptionNotification(t *testing.T) {

	updateScenario("mobility3")

	httpLog, err = metricStore.GetHttpMetric(logModuleLocServ, "TX", "", 1)
	httpLog, err = metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
+4 −3
Original line number Diff line number Diff line
@@ -44,9 +44,9 @@ import (
	"github.com/gorilla/mux"
)

const moduleName = "meep-rnis"
const rnisBasePath = "rni/v2/"
const rnisKey = "rnis"
const logModuleRNIS = "meep-rnis"
const serviceName = "RNI Service"
const defaultMepName = "global"
const defaultScopeOfLocality = "MEC_SYSTEM"
@@ -229,6 +229,7 @@ func Init() (err error) {
	log.Info("MEEP_INSTANCE_ID: ", instanceId)

	// Retrieve Instance Name from environment variable
	instanceName = moduleName
	instanceNameEnv := strings.TrimSpace(os.Getenv("MEEP_POD_NAME"))
	if instanceNameEnv != "" {
		instanceName = instanceNameEnv
@@ -3700,9 +3701,9 @@ func updateStoreName(storeName string) {
	if currentStoreName != storeName {
		currentStoreName = storeName

		logComponent := logModuleRNIS
		logComponent := moduleName
		if mepName != defaultMepName {
			logComponent = logModuleRNIS + "-" + mepName
			logComponent = moduleName + "-" + mepName
		}
		err := httpLog.ReInit(logComponent, sandboxName, storeName, redisAddr, influxAddr)
		if err != nil {
+4 −4
Original line number Diff line number Diff line
@@ -1689,7 +1689,7 @@ func TestSubscriptionCellChangeNotification(t *testing.T) {
	updateScenario("mobility3")
	time.Sleep(100 * time.Millisecond)

	httpLog, err := metricStore.GetHttpMetric(logModuleRNIS, "TX", "", 1)
	httpLog, err := metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
@@ -1826,7 +1826,7 @@ func TestSubscriptionRabEstNotification(t *testing.T) {
		t.Fatalf("Failed to create a store")
	}

	httpLog, err := metricStore.GetHttpMetric(logModuleRNIS, "TX", "", 1)
	httpLog, err := metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
@@ -1962,7 +1962,7 @@ func TestSubscriptionRabRelNotification(t *testing.T) {
		t.Fatalf("Failed to create a store")
	}

	httpLog, err := metricStore.GetHttpMetric(logModuleRNIS, "TX", "", 1)
	httpLog, err := metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
@@ -2099,7 +2099,7 @@ func TestSubscriptionMeasRepUeNotification(t *testing.T) {
		t.Fatalf("Failed to create a store")
	}

	httpLog, err := metricStore.GetHttpMetric(logModuleRNIS, "TX", "", 1)
	httpLog, err := metricStore.GetHttpMetric(moduleName, "TX", "", 1)
	if err != nil || len(httpLog) != 1 {
		t.Fatalf("Failed to get metric")
	}
+4 −3
Original line number Diff line number Diff line
@@ -45,9 +45,9 @@ import (
	"github.com/gorilla/mux"
)

const moduleName = "meep-wais"
const waisBasePath = "wai/v2/"
const waisKey = "wais"
const logModuleWAIS = "meep-wais"
const serviceName = "WAI Service"
const defaultMepName = "global"
const defaultScopeOfLocality = "MEC_SYSTEM"
@@ -163,6 +163,7 @@ func Init() (err error) {
	log.Info("MEEP_INSTANCE_ID: ", instanceId)

	// Retrieve Instance Name from environment variable
	instanceName = moduleName
	instanceNameEnv := strings.TrimSpace(os.Getenv("MEEP_POD_NAME"))
	if instanceNameEnv != "" {
		instanceName = instanceNameEnv
@@ -1957,9 +1958,9 @@ func updateStoreName(storeName string) {
	if currentStoreName != storeName {
		currentStoreName = storeName

		logComponent := logModuleWAIS
		logComponent := moduleName
		if mepName != defaultMepName {
			logComponent = logModuleWAIS + "-" + mepName
			logComponent = moduleName + "-" + mepName
		}
		err := httpLog.ReInit(logComponent, sandboxName, storeName, redisAddr, influxAddr)
		if err != nil {
Loading