X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=E2Manager%2Fhandlers%2Fx2_reset_response_handler_test.go;h=8846501886199be2629d5904c7c4abdec78f89a4;hb=2151d81e25b521d1d7f76fee0f286723e9b00913;hp=1ea838413790f8b69783a17bfd56aca565d8b3d1;hpb=d87a48993ea97a5fd89db260804f44cf56b844ee;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/x2_reset_response_handler_test.go b/E2Manager/handlers/x2_reset_response_handler_test.go index 1ea8384..8846501 100644 --- a/E2Manager/handlers/x2_reset_response_handler_test.go +++ b/E2Manager/handlers/x2_reset_response_handler_test.go @@ -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, ¬ificationRequest, 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, ¬ificationRequest, 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, ¬ificationRequest, messageChannel) - if _, ok := e2Sessions[string(xaction)]; ok { - t.Errorf("want: no session entry, got: session entry for: %s", string(xaction) ) - } + //TODO:Nothing to verify }