Commit 84e566ac authored by Simon Pastor's avatar Simon Pastor
Browse files

ut failure showed a flaw in wais, loc-serv test file update

parent 057f5953
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1667,8 +1667,8 @@ func TestAPInfo(t *testing.T) {
	/******************************
	 * expected response section
	 ******************************/
	expectedConnType := CONTYPE_UNKNOWN
	expectedOpStatus := OPSTATUS_UNKNOWN
	expectedConnType := MACRO
	expectedOpStatus := SERVICEABLE
	expectedTimeZone := time.Time{}
	expectedAPInfo := AccessPointInfo{"zone1-poa-cell1", nil, &expectedConnType, &expectedOpStatus, 2, expectedTimeZone, "", ""}

+3 −2
Original line number Diff line number Diff line
@@ -235,7 +235,9 @@ func isUpdateApInfoNeeded(jsonApInfoComplete string, newLong int32, newLat int32
	var oldLat int32 = 0
	var oldLong int32 = 0

	if jsonApInfoComplete != "" {
	if jsonApInfoComplete == "" {
		return true
	} else {
		apInfoComplete := convertJsonToApInfoComplete(jsonApInfoComplete)
		oldStaMacIds = apInfoComplete.StaMacIds

@@ -257,7 +259,6 @@ func isUpdateApInfoNeeded(jsonApInfoComplete string, newLong int32, newLat int32

	//if the list of connected STAs is different
	return !reflect.DeepEqual(oldStaMacIds, staMacIds)

}

func updateApInfo(name string, apMacId string, longitude *float32, latitude *float32, staMacIds []string) {