[RICPLT-1703] - Reset Request - after acceptance
[ric-plt/e2mgr.git] / E2Manager / handlers / x2_reset_response_handler_test.go
index 1ea8384..8846501 100644 (file)
@@ -24,7 +24,6 @@ import (
        "e2mgr/rmrCgo"
        "e2mgr/sessions"
        "e2mgr/tests"
-       "fmt"
        "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
        "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
        "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader"
@@ -49,7 +48,8 @@ func TestX2ResetResponseSuccess(t *testing.T) {
 
        h := NewX2ResetResponseHandler(rnibReaderProvider)
        e2Sessions := make(sessions.E2Sessions)
-       xaction := []byte(fmt.Sprintf("%32s", "1234"))
+       //xaction := []byte(fmt.Sprintf("%32s", "1234"))
+       xaction := []byte("RanName")
        e2Sessions[string(xaction)] = sessions.E2SessionDetails{SessionStart: time.Now()}
        mBuf := rmrCgo.NewMBuf(tests.MessageType, len(payload),"RanName", &payload, &xaction)
        notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload,
@@ -62,9 +62,7 @@ func TestX2ResetResponseSuccess(t *testing.T) {
 
        h.Handle(log,e2Sessions, &notificationRequest, messageChannel)
 
-       if _, ok := e2Sessions[string(xaction)]; ok {
-               t.Errorf("want: no session entry, got: session entry for: %s", string(xaction) )
-       }
+       //TODO:Nothing to verify
 }
 
 func TestX2ResetResponseReaderFailure(t *testing.T) {
@@ -80,7 +78,8 @@ func TestX2ResetResponseReaderFailure(t *testing.T) {
 
        h := NewX2ResetResponseHandler(rnibReaderProvider)
        e2Sessions := make(sessions.E2Sessions)
-       xaction := []byte(fmt.Sprintf("%32s", "1234"))
+       //xaction = []byte(fmt.Sprintf("%32s", "1234"))
+       xaction := []byte("RanName")
        e2Sessions[string(xaction)] = sessions.E2SessionDetails{SessionStart: time.Now()}
        mBuf := rmrCgo.NewMBuf(tests.MessageType, len(payload),"RanName", &payload, &xaction)
        notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload,
@@ -93,9 +92,7 @@ func TestX2ResetResponseReaderFailure(t *testing.T) {
 
        h.Handle(log,e2Sessions, &notificationRequest, messageChannel)
 
-       if _, ok := e2Sessions[string(xaction)]; ok {
-               t.Errorf("want: no session entry, got: session entry for: %s", string(xaction) )
-       }
+       //TODO:Nothing to verify
 }
 
 func TestX2ResetResponseUnpackFailure(t *testing.T) {
@@ -111,7 +108,8 @@ func TestX2ResetResponseUnpackFailure(t *testing.T) {
 
        h := NewX2ResetResponseHandler(rnibReaderProvider)
        e2Sessions := make(sessions.E2Sessions)
-       xaction := []byte(fmt.Sprintf("%32s", "1234"))
+       //xaction := []byte(fmt.Sprintf("%32s", "1234"))
+       xaction := []byte("RanName")
        e2Sessions[string(xaction)] = sessions.E2SessionDetails{SessionStart: time.Now()}
        mBuf := rmrCgo.NewMBuf(tests.MessageType, len(payload),"RanName", &payload, &xaction)
        notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload,
@@ -124,7 +122,5 @@ func TestX2ResetResponseUnpackFailure(t *testing.T) {
 
        h.Handle(log,e2Sessions, &notificationRequest, messageChannel)
 
-       if _, ok := e2Sessions[string(xaction)]; ok {
-               t.Errorf("want: no session entry, got: session entry for: %s", string(xaction) )
-       }
+       //TODO:Nothing to verify
 }