Code Review
/
ric-plt
/
submgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Don't make rmr stub check if there is none of them
[ric-plt/submgr.git]
/
e2ap
/
pkg
/
e2ap
/
e2ap_tests
/
msg_e2ap_subscriptiondelete.go
diff --git
a/e2ap/pkg/e2ap/e2ap_tests/msg_e2ap_subscriptiondelete.go
b/e2ap/pkg/e2ap/e2ap_tests/msg_e2ap_subscriptiondelete.go
index
aa0fc39
..
9eeccff
100644
(file)
--- a/
e2ap/pkg/e2ap/e2ap_tests/msg_e2ap_subscriptiondelete.go
+++ b/
e2ap/pkg/e2ap/e2ap_tests/msg_e2ap_subscriptiondelete.go
@@
-42,30
+42,20
@@
func (testCtxt *E2ApTests) E2ApTestMsgSubscriptionDeleteRequest(t *testing.T) {
areqenc.RequestId.Seq = 22
areqenc.FunctionId = 33
areqenc.RequestId.Seq = 22
areqenc.FunctionId = 33
- seterr := e2SubsReq.Set(&areqenc)
- if seterr != nil {
- testCtxt.testError(t, "set err: %s", seterr.Error())
- return
- }
- testCtxt.testPrint("print:\n%s", e2SubsReq.String())
testCtxt.testPrint("pack")
testCtxt.testPrint("pack")
- err, packedMsg := e2SubsReq.Pack(
nil
)
+ err, packedMsg := e2SubsReq.Pack(
&areqenc
)
if err != nil {
testCtxt.testError(t, "Pack failed: %s", err.Error())
return
}
if err != nil {
testCtxt.testError(t, "Pack failed: %s", err.Error())
return
}
+ testCtxt.testPrint("print:\n%s", e2SubsReq.String())
testCtxt.testPrint("unpack")
testCtxt.testPrint("unpack")
- err
= e2SubsReq.UnPack(packedMsg)
+ err
, areqdec :
= e2SubsReq.UnPack(packedMsg)
if err != nil {
testCtxt.testError(t, "UnPack failed: %s", err.Error())
return
}
testCtxt.testPrint("print:\n%s", e2SubsReq.String())
if err != nil {
testCtxt.testError(t, "UnPack failed: %s", err.Error())
return
}
testCtxt.testPrint("print:\n%s", e2SubsReq.String())
- geterr, areqdec := e2SubsReq.Get()
- if geterr != nil {
- testCtxt.testError(t, "get nil: %s", geterr.Error())
- return
- }
testCtxt.testValueEquality(t, "msg", &areqenc, areqdec)
}
testCtxt.testValueEquality(t, "msg", &areqenc, areqdec)
}
@@
-83,30
+73,20
@@
func (testCtxt *E2ApTests) E2ApTestMsgSubscriptionDeleteResponse(t *testing.T) {
arespenc.RequestId.Seq = 22
arespenc.FunctionId = 33
arespenc.RequestId.Seq = 22
arespenc.FunctionId = 33
- seterr := e2SubsResp.Set(&arespenc)
- if seterr != nil {
- testCtxt.testError(t, "set err: %s", seterr.Error())
- return
- }
- testCtxt.testPrint("print:\n%s", e2SubsResp.String())
testCtxt.testPrint("pack")
testCtxt.testPrint("pack")
- err, packedMsg := e2SubsResp.Pack(
nil
)
+ err, packedMsg := e2SubsResp.Pack(
&arespenc
)
if err != nil {
testCtxt.testError(t, "Pack failed: %s", err.Error())
return
}
if err != nil {
testCtxt.testError(t, "Pack failed: %s", err.Error())
return
}
+ testCtxt.testPrint("print:\n%s", e2SubsResp.String())
testCtxt.testPrint("unpack")
testCtxt.testPrint("unpack")
- err
= e2SubsResp.UnPack(packedMsg)
+ err
, arespdec :
= e2SubsResp.UnPack(packedMsg)
if err != nil {
testCtxt.testError(t, "UnPack failed: %s", err.Error())
return
}
testCtxt.testPrint("print:\n%s", e2SubsResp.String())
if err != nil {
testCtxt.testError(t, "UnPack failed: %s", err.Error())
return
}
testCtxt.testPrint("print:\n%s", e2SubsResp.String())
- geterr, arespdec := e2SubsResp.Get()
- if geterr != nil {
- testCtxt.testError(t, "get nil: %s", geterr.Error())
- return
- }
testCtxt.testValueEquality(t, "msg", &arespenc, arespdec)
}
testCtxt.testValueEquality(t, "msg", &arespenc, arespdec)
}
@@
-141,30
+121,20
@@
func (testCtxt *E2ApTests) E2ApTestMsgSubscriptionDeleteFailure(t *testing.T) {
// afailenc.CriticalityDiagnostics.CriticalityDiagnosticsIEList.Items = append(afailenc.CriticalityDiagnostics.CriticalityDiagnosticsIEList.Items, ieitem)
// }
// afailenc.CriticalityDiagnostics.CriticalityDiagnosticsIEList.Items = append(afailenc.CriticalityDiagnostics.CriticalityDiagnosticsIEList.Items, ieitem)
// }
- seterr := e2SubsFail.Set(&afailenc)
- if seterr != nil {
- testCtxt.testError(t, "set err: %s", seterr.Error())
- return
- }
- testCtxt.testPrint("print:\n%s", e2SubsFail.String())
testCtxt.testPrint("pack")
testCtxt.testPrint("pack")
- err, packedMsg := e2SubsFail.Pack(
nil
)
+ err, packedMsg := e2SubsFail.Pack(
&afailenc
)
if err != nil {
testCtxt.testError(t, "Pack failed: %s", err.Error())
return
}
if err != nil {
testCtxt.testError(t, "Pack failed: %s", err.Error())
return
}
+ testCtxt.testPrint("print:\n%s", e2SubsFail.String())
testCtxt.testPrint("unpack")
testCtxt.testPrint("unpack")
- err
= e2SubsFail.UnPack(packedMsg)
+ err
, afaildec :
= e2SubsFail.UnPack(packedMsg)
if err != nil {
testCtxt.testError(t, "UnPack failed: %s", err.Error())
return
}
testCtxt.testPrint("print:\n%s", e2SubsFail.String())
if err != nil {
testCtxt.testError(t, "UnPack failed: %s", err.Error())
return
}
testCtxt.testPrint("print:\n%s", e2SubsFail.String())
- geterr, afaildec := e2SubsFail.Get()
- if geterr != nil {
- testCtxt.testError(t, "get nil: %s", geterr.Error())
- return
- }
testCtxt.testValueEquality(t, "msg", &afailenc, afaildec)
}
testCtxt.testValueEquality(t, "msg", &afailenc, afaildec)
}
@@
-176,16
+146,11
@@
func (testCtxt *E2ApTests) E2ApTestMsgSubscriptionDeleteRequestBuffers(t *testin
return
}
e2SubResp := testCtxt.packerif.NewPackerSubscriptionDeleteRequest()
return
}
e2SubResp := testCtxt.packerif.NewPackerSubscriptionDeleteRequest()
- err := e2SubResp.UnPack(packedData)
+ err
, _
:= e2SubResp.UnPack(packedData)
if err != nil {
testCtxt.testError(t, "UnPack() Failed: %s [%s]", err.Error(), buffer)
return
}
if err != nil {
testCtxt.testError(t, "UnPack() Failed: %s [%s]", err.Error(), buffer)
return
}
- err, _ = e2SubResp.Get()
- if err != nil {
- testCtxt.testError(t, "Get() Failed: %s [%s]", err.Error(), buffer)
- return
- }
testCtxt.testPrint("OK [%s]", buffer)
}
testCtxt.testPrint("OK [%s]", buffer)
}
@@
-214,16
+179,11
@@
func (testCtxt *E2ApTests) E2ApTestMsgSubscriptionDeleteResponseBuffers(t *testi
return
}
e2SubResp := testCtxt.packerif.NewPackerSubscriptionDeleteResponse()
return
}
e2SubResp := testCtxt.packerif.NewPackerSubscriptionDeleteResponse()
- err := e2SubResp.UnPack(packedData)
+ err
, _
:= e2SubResp.UnPack(packedData)
if err != nil {
testCtxt.testError(t, "UnPack() Failed: %s [%s]", err.Error(), buffer)
return
}
if err != nil {
testCtxt.testError(t, "UnPack() Failed: %s [%s]", err.Error(), buffer)
return
}
- err, _ = e2SubResp.Get()
- if err != nil {
- testCtxt.testError(t, "Get() Failed: %s [%s]", err.Error(), buffer)
- return
- }
testCtxt.testPrint("OK [%s]", buffer)
}
testCtxt.testPrint("OK [%s]", buffer)
}
@@
-240,16
+200,11
@@
func (testCtxt *E2ApTests) E2ApTestMsgSubscriptionDeleteFailureBuffers(t *testin
return
}
e2SubResp := testCtxt.packerif.NewPackerSubscriptionDeleteFailure()
return
}
e2SubResp := testCtxt.packerif.NewPackerSubscriptionDeleteFailure()
- err := e2SubResp.UnPack(packedData)
+ err
, _
:= e2SubResp.UnPack(packedData)
if err != nil {
testCtxt.testError(t, "UnPack() Failed: %s [%s]", err.Error(), buffer)
return
}
if err != nil {
testCtxt.testError(t, "UnPack() Failed: %s [%s]", err.Error(), buffer)
return
}
- err, _ = e2SubResp.Get()
- if err != nil {
- testCtxt.testError(t, "Get() Failed: %s [%s]", err.Error(), buffer)
- return
- }
testCtxt.testPrint("OK [%s]", buffer)
}
testCtxt.testPrint("OK [%s]", buffer)
}