Skip to content

Commit

Permalink
Issue435 reproduce (free5gc#437)
Browse files Browse the repository at this point in the history
* Alphabetic SD test

* Case mismatch SD test
  • Loading branch information
ShouheiNishi authored Aug 23, 2023
1 parent 4984f85 commit 171d7e9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {
DefaultSingleNssais: []models.Snssai{
{
Sst: 1,
Sd: "010203",
Sd: "FEDCBA",
},
{
Sst: 1,
Expand All @@ -33,7 +33,7 @@ func init() {
SingleNssais: []models.Snssai{
{
Sst: 1,
Sd: "010203",
Sd: "FEDCBA",
},
{
Sst: 1,
Expand All @@ -49,7 +49,7 @@ func init() {

TestSmfSelDataTable[FREE5GC_CASE] = models.SmfSelectionSubscriptionData{
SubscribedSnssaiInfos: map[string]models.SnssaiInfo{
"01010203": { // sst:1, sd:010203
"01FEDCBA": { // sst:1, sd:FEDCBA
DnnInfos: []models.DnnInfo{
{
Dnn: "internet",
Expand All @@ -74,9 +74,9 @@ func init() {

TestSmPolicyDataTable[FREE5GC_CASE] = models.SmPolicyData{
SmPolicySnssaiData: map[string]models.SmPolicySnssaiData{
"01010203": {
"01FEDCBA": {
Snssai: &models.Snssai{
Sd: "010203",
Sd: "FEDCBA",
Sst: 1,
},
SmPolicyDnnData: map[string]models.SmPolicyDnnData{
Expand All @@ -103,7 +103,7 @@ func init() {
{
SingleNssai: &models.Snssai{
Sst: 1,
Sd: "010203",
Sd: "FEDCBA",
},
DnnConfigurations: map[string]models.DnnConfiguration{
"internet": {
Expand Down
2 changes: 1 addition & 1 deletion test/ngapTestpacket/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func BuildNGSetupRequest() (pdu ngapType.NGAPPDU) {
sliceSupportItem.SNSSAI.SST.Value = aper.OctetString("\x01")
// optional
sliceSupportItem.SNSSAI.SD = new(ngapType.SD)
sliceSupportItem.SNSSAI.SD.Value = aper.OctetString("\x01\x02\x03")
sliceSupportItem.SNSSAI.SD.Value = aper.OctetString("\xfe\xdc\xba")

sliceSupportList.List = append(sliceSupportList.List, sliceSupportItem)

Expand Down
10 changes: 5 additions & 5 deletions test/ngsetup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func amfConfig(testID string) error {
},
SNssaiList: []models.Snssai{{
Sst: 1,
Sd: "010203",
Sd: "fedcba",
}, {
Sst: 1,
Sd: "112233",
Expand Down Expand Up @@ -445,7 +445,7 @@ func smfConfig(testID string) error {
SNssaiInfo: []*smf_factory.SnssaiInfoItem{{
SNssai: &models.Snssai{
Sst: 1,
Sd: "010203",
Sd: "fedcba",
},
DnnInfos: []*smf_factory.SnssaiDnnInfoItem{{
Dnn: "internet",
Expand Down Expand Up @@ -494,7 +494,7 @@ func smfConfig(testID string) error {
SNssaiInfos: []*smf_factory.SnssaiUpfInfoItem{{
SNssai: &models.Snssai{
Sst: 1,
Sd: "010203",
Sd: "fedcba",
},
DnnUpfInfoList: []*smf_factory.DnnUpfInfoItem{{
Dnn: "internet",
Expand Down Expand Up @@ -842,7 +842,7 @@ func nssfConfig() error {
},
SupportedSnssaiList: []models.Snssai{{
Sst: 1,
Sd: "010203",
Sd: "fedcba",
}, {
Sst: 1,
Sd: "112233",
Expand Down Expand Up @@ -915,7 +915,7 @@ func nssfConfig() error {
}, {
Snssai: &models.Snssai{
Sst: 1,
Sd: "010203",
Sd: "fedcba",
},
NsiInformationList: []models.NsiInformation{{
NrfId: "http://127.0.0.10:8000/nnrf-nfm/v1/nf-instances",
Expand Down
2 changes: 1 addition & 1 deletion test/registration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func TestRegistration(t *testing.T) {

sNssai := models.Snssai{
Sst: 1,
Sd: "010203",
Sd: "fedcba",
}
pdu = nasTestpacket.GetUlNasTransport_PduSessionEstablishmentRequest(10, nasMessage.ULNASTransportRequestTypeInitialRequest, "internet", &sNssai)
pdu, err = test.EncodeNasPduWithSecurity(ue, pdu, nas.SecurityHeaderTypeIntegrityProtectedAndCiphered, true, false)
Expand Down

0 comments on commit 171d7e9

Please sign in to comment.