Updating AttributeSv1 integration tests with MatchingProfiles

This commit is contained in:
DanB
2018-07-19 19:41:09 +02:00
parent 2e2e97a4ac
commit c62e866320
3 changed files with 27 additions and 27 deletions

View File

@@ -294,8 +294,8 @@ func testAttributeSProcessEvent(t *testing.T) {
},
}
eRply := &engine.AttrSProcessEventReply{
MatchedProfile: "ATTR_1",
AlteredFields: []string{utils.Subject, utils.Account},
MatchedProfiles: []string{"ATTR_1"},
AlteredFields: []string{utils.Subject, utils.Account},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSProcessEvent",
@@ -308,8 +308,8 @@ func testAttributeSProcessEvent(t *testing.T) {
},
}
eRply2 := &engine.AttrSProcessEventReply{
MatchedProfile: "ATTR_1",
AlteredFields: []string{utils.Account, utils.Subject},
MatchedProfiles: []string{"ATTR_1"},
AlteredFields: []string{utils.Account, utils.Subject},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSProcessEvent",
@@ -374,8 +374,8 @@ func testAttributeSProcessEventWithNoneSubstitute(t *testing.T) {
t.Error("Unexpected reply returned", result)
}
eRply := &engine.AttrSProcessEventReply{
MatchedProfile: "AttributeWithNonSubstitute",
AlteredFields: []string{utils.Account, utils.Subject},
MatchedProfiles: []string{"AttributeWithNonSubstitute"},
AlteredFields: []string{utils.Account, utils.Subject},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSWithNoneSubstitute",
@@ -387,8 +387,8 @@ func testAttributeSProcessEventWithNoneSubstitute(t *testing.T) {
},
}
eRply2 := &engine.AttrSProcessEventReply{
MatchedProfile: "AttributeWithNonSubstitute",
AlteredFields: []string{utils.Subject, utils.Account},
MatchedProfiles: []string{"AttributeWithNonSubstitute"},
AlteredFields: []string{utils.Subject, utils.Account},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSWithNoneSubstitute",
@@ -453,8 +453,8 @@ func testAttributeSProcessEventWithNoneSubstitute2(t *testing.T) {
t.Error("Unexpected reply returned", result)
}
eRply := &engine.AttrSProcessEventReply{
MatchedProfile: "AttributeWithNonSubstitute",
AlteredFields: []string{"Account", "Subject"},
MatchedProfiles: []string{"AttributeWithNonSubstitute"},
AlteredFields: []string{"Account", "Subject"},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSWithNoneSubstitute",
@@ -466,8 +466,8 @@ func testAttributeSProcessEventWithNoneSubstitute2(t *testing.T) {
},
}
eRply2 := &engine.AttrSProcessEventReply{
MatchedProfile: "AttributeWithNonSubstitute",
AlteredFields: []string{utils.Subject, utils.Account},
MatchedProfiles: []string{"AttributeWithNonSubstitute"},
AlteredFields: []string{utils.Subject, utils.Account},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSWithNoneSubstitute",
@@ -531,8 +531,8 @@ func testAttributeSProcessEventWithNoneSubstitute3(t *testing.T) {
t.Error("Unexpected reply returned", result)
}
eRply := &engine.AttrSProcessEventReply{
MatchedProfile: "AttributeWithNonSubstitute",
AlteredFields: []string{"Account", "Subject"},
MatchedProfiles: []string{"AttributeWithNonSubstitute"},
AlteredFields: []string{"Account", "Subject"},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSWithNoneSubstitute",
@@ -544,8 +544,8 @@ func testAttributeSProcessEventWithNoneSubstitute3(t *testing.T) {
},
}
eRply2 := &engine.AttrSProcessEventReply{
MatchedProfile: "AttributeWithNonSubstitute",
AlteredFields: []string{utils.Subject, utils.Account},
MatchedProfiles: []string{"AttributeWithNonSubstitute"},
AlteredFields: []string{utils.Subject, utils.Account},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testAttributeSWithNoneSubstitute",

View File

@@ -168,15 +168,15 @@ func testChargerSGetChargersForEvent(t *testing.T) {
if err := chargerRPC.Call(utils.ChargerSv1GetChargersForEvent, chargerEvent[0], &result); err != nil {
t.Error(err)
} else if !reflect.DeepEqual(result, chargerProfiles) {
t.Errorf("Expecting : %s, received: %s", chargerProfiles, result)
t.Errorf("Expecting : %+v, received: %+v", chargerProfiles, result)
}
}
func testChargerSProcessEvent(t *testing.T) {
processedEv := &[]*engine.AttrSProcessEventReply{
&engine.AttrSProcessEventReply{
MatchedProfile: "ATTR_1001_SIMPLEAUTH",
AlteredFields: []string{"Password"},
MatchedProfiles: []string{"ATTR_1001_SIMPLEAUTH"},
AlteredFields: []string{"Password"},
CGREvent: &utils.CGREvent{ // matching Charger1
Tenant: "cgrates.org",
ID: "event1",

View File

@@ -183,8 +183,8 @@ func TestSSv1ItAuth(t *testing.T) {
t.Errorf("expecting: %+v, received: %+v", utils.ToJSON(eSplrs), utils.ToJSON(rply.Suppliers))
}
eAttrs := &engine.AttrSProcessEventReply{
MatchedProfile: "ATTR_ACNT_1001",
AlteredFields: []string{"OfficeGroup"},
MatchedProfiles: []string{"ATTR_ACNT_1001"},
AlteredFields: []string{"OfficeGroup"},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "TestSSv1ItAuth",
@@ -288,8 +288,8 @@ func TestSSv1ItInitiateSession(t *testing.T) {
t.Errorf("Unexpected ResourceAllocation: %s", *rply.ResourceAllocation)
}
eAttrs := &engine.AttrSProcessEventReply{
MatchedProfile: "ATTR_ACNT_1001",
AlteredFields: []string{"OfficeGroup"},
MatchedProfiles: []string{"ATTR_ACNT_1001"},
AlteredFields: []string{"OfficeGroup"},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "TestSSv1ItInitiateSession",
@@ -384,8 +384,8 @@ func TestSSv1ItUpdateSession(t *testing.T) {
t.Error(err)
}
eAttrs := &engine.AttrSProcessEventReply{
MatchedProfile: "ATTR_ACNT_1001",
AlteredFields: []string{"OfficeGroup"},
MatchedProfiles: []string{"ATTR_ACNT_1001"},
AlteredFields: []string{"OfficeGroup"},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "TestSSv1ItUpdateSession",
@@ -507,8 +507,8 @@ func TestSSv1ItProcessEvent(t *testing.T) {
t.Errorf("Unexpected ResourceAllocation: %s", *rply.ResourceAllocation)
}
eAttrs := &engine.AttrSProcessEventReply{
MatchedProfile: "ATTR_ACNT_1001",
AlteredFields: []string{"OfficeGroup"},
MatchedProfiles: []string{"ATTR_ACNT_1001"},
AlteredFields: []string{"OfficeGroup"},
CGREvent: &utils.CGREvent{
Tenant: "cgrates.org",
ID: "TestSSv1ItProcessEvent",