resp, _ := xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560"})
waiter := rtmgrHttp.AllocNextEvent(false)
newSubsId := mainCtrl.get_registry_next_subid(t)
resp, _ := xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560"})
deltrans := xappConn1.SendSubsDelReq(t, nil, e2SubsId)
delreq, delmsg := e2termConn1.RecvSubsDelReq(t)
resp, _ := xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId1))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560", "localhost:13660"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560", "localhost:13660"})
//Del1
waiter := rtmgrHttp.AllocNextEvent(false)
resp, _ := xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560"})
deltrans := xappConn1.SendSubsDelReq(t, nil, e2SubsId)
delreq, delmsg := e2termConn1.RecvSubsDelReq(t)
resp, _ := xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId1))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560", "localhost:13660"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560", "localhost:13660"})
//Del1
deltrans1 := xappConn1.SendSubsDelReq(t, nil, e2SubsId1)
resp, _ := xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560"})
e2SubsId := uint32(resp[0].SubscriptionID)
t.Logf("e2SubsId = %v", e2SubsId)
resp, _ := xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560"})
mainCtrl.SimulateRestart(t)
resp, _ = xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560"})
deltrans := xappConn1.SendSubsDelReq(t, nil, e2SubsId)
delreq, delmsg := e2termConn1.RecvSubsDelReq(t)
resp, _ := xapp.Subscription.QuerySubscriptions() ////////////////////////////////
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId1))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560", "localhost:13660"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560", "localhost:13660"})
mainCtrl.SimulateRestart(t)
resp, _ = xapp.Subscription.QuerySubscriptions()
assert.Equal(t, resp[0].SubscriptionID, int64(e2SubsId1))
assert.Equal(t, resp[0].Meid, "RAN_NAME_1")
- assert.Equal(t, resp[0].Endpoint, []string{"localhost:13560", "localhost:13660"})
+ assert.Equal(t, resp[0].ClientEndpoint, []string{"localhost:13560", "localhost:13660"})
//Del1
deltrans1 := xappConn1.SendSubsDelReq(t, nil, e2SubsId1)
e2termConn1.TestMsgChanEmpty(t)
mainCtrl.wait_registry_empty(t, 10)
}
+
+//-----------------------------------------------------------------------------
+// Test debug GET and POST requests
+//
+// curl
+// +-------+ +---------+
+// | user | | submgr |
+// +-------+ +---------+
+// | |
+// | GET/POST Req |
+// |------------->|
+// | Resp |
+// |<-------------|
+// | |
+
+func TestGetSubscriptions(t *testing.T) {
+
+ mainCtrl.sendGetRequest(t, "localhost:8088", "/ric/v1/subscriptions")
+}
+
+func TestGetSymptomData(t *testing.T) {
+
+ mainCtrl.sendGetRequest(t, "localhost:8080", "/ric/v1/symptomdata")
+}
+
+func TestPostdeleteSubId(t *testing.T) {
+
+ mainCtrl.sendPostRequest(t, "localhost:8080", "/ric/v1/test/deletesubid=1")
+}
+
+func TestPostEmptyDb(t *testing.T) {
+
+ mainCtrl.sendPostRequest(t, "localhost:8080", "/ric/v1/test/emptydb")
+}