mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
TPRequestSubstitute -> TPAttributeSubstitute
This commit is contained in:
committed by
Dan Christian Bogos
parent
d8c1cbfb34
commit
bd009108e0
@@ -130,8 +130,8 @@ func testTPAlsPrfSetTPAlsPrf(t *testing.T) {
|
||||
ExpiryTime: "",
|
||||
},
|
||||
Context: "con1",
|
||||
Substitutes: []*utils.TPRequestSubstitute{
|
||||
&utils.TPRequestSubstitute{
|
||||
Substitutes: []*utils.TPAttributeSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Alias: "Al1",
|
||||
@@ -168,14 +168,14 @@ func testTPAlsPrfGetTPAlsPrfIDs(t *testing.T) {
|
||||
}
|
||||
|
||||
func testTPAlsPrfUpdateTPAlsPrf(t *testing.T) {
|
||||
tpAlsPrf.Substitutes = []*utils.TPRequestSubstitute{
|
||||
&utils.TPRequestSubstitute{
|
||||
tpAlsPrf.Substitutes = []*utils.TPAttributeSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Alias: "Al1",
|
||||
Append: true,
|
||||
},
|
||||
&utils.TPRequestSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "FL2",
|
||||
Initial: "In2",
|
||||
Alias: "Al2",
|
||||
|
||||
@@ -62,11 +62,11 @@ func TestDMitMongo(t *testing.T) {
|
||||
mgoITCfg.StorDBName, mgoITCfg.StorDBUser, mgoITCfg.StorDBPass,
|
||||
utils.StorDB, nil, mgoITCfg.CacheCfg(), mgoITCfg.LoadHistorySize)
|
||||
if err != nil {
|
||||
t.Fatal("Could not connect to Redis", err.Error())
|
||||
t.Fatal("Could not connect to Mongo", err.Error())
|
||||
}
|
||||
dm2 = NewDataManager(dataDB)
|
||||
for _, stest := range sTestsDMit {
|
||||
t.Run("TestDMitRedis", stest)
|
||||
t.Run("TestDMitMongo", stest)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1676,14 +1676,14 @@ func TestLoadAttributeProfiles(t *testing.T) {
|
||||
ActivationTime: "2014-07-29T15:00:00Z",
|
||||
},
|
||||
Context: "con1",
|
||||
Substitutes: []*utils.TPRequestSubstitute{
|
||||
&utils.TPRequestSubstitute{
|
||||
Substitutes: []*utils.TPAttributeSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "Field1",
|
||||
Initial: "Initial1",
|
||||
Alias: "Alias1",
|
||||
Append: true,
|
||||
},
|
||||
&utils.TPRequestSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "Field2",
|
||||
Initial: "Initial2",
|
||||
Alias: "Alias2",
|
||||
|
||||
@@ -2670,7 +2670,7 @@ func (tps TPAttributes) AsTPAttributes() (result []*utils.TPAttribute) {
|
||||
th.Context = tp.Context
|
||||
}
|
||||
if tp.FieldName != "" {
|
||||
th.Substitutes = append(th.Substitutes, &utils.TPRequestSubstitute{
|
||||
th.Substitutes = append(th.Substitutes, &utils.TPAttributeSubstitute{
|
||||
FieldName: tp.FieldName,
|
||||
Initial: tp.Initial,
|
||||
Alias: tp.Alias,
|
||||
|
||||
@@ -1071,8 +1071,8 @@ func TestAPItoAttributeProfile(t *testing.T) {
|
||||
ActivationTime: "2014-07-14T14:35:00Z",
|
||||
ExpiryTime: "",
|
||||
},
|
||||
Substitutes: []*utils.TPRequestSubstitute{
|
||||
&utils.TPRequestSubstitute{
|
||||
Substitutes: []*utils.TPAttributeSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Alias: "Al1",
|
||||
@@ -1118,8 +1118,8 @@ func TestAPItoModelTPAttribute(t *testing.T) {
|
||||
ActivationTime: "2014-07-14T14:35:00Z",
|
||||
ExpiryTime: "",
|
||||
},
|
||||
Substitutes: []*utils.TPRequestSubstitute{
|
||||
&utils.TPRequestSubstitute{
|
||||
Substitutes: []*utils.TPAttributeSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Alias: "Al1",
|
||||
@@ -1175,8 +1175,8 @@ func TestModelAsTPAttribute(t *testing.T) {
|
||||
ActivationTime: "2014-07-14T14:35:00Z",
|
||||
ExpiryTime: "",
|
||||
},
|
||||
Substitutes: []*utils.TPRequestSubstitute{
|
||||
&utils.TPRequestSubstitute{
|
||||
Substitutes: []*utils.TPAttributeSubstitute{
|
||||
&utils.TPAttributeSubstitute{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Alias: "Al1",
|
||||
|
||||
@@ -1382,7 +1382,7 @@ type TPSupplier struct {
|
||||
Weight float64
|
||||
}
|
||||
|
||||
type TPRequestSubstitute struct {
|
||||
type TPAttributeSubstitute struct {
|
||||
FieldName string
|
||||
Initial string
|
||||
Alias string
|
||||
@@ -1396,6 +1396,6 @@ type TPAttribute struct {
|
||||
FilterIDs []string
|
||||
ActivationInterval *TPActivationInterval // Time when this limit becomes active and expires
|
||||
Context string // bind this TPAttribute to specific context
|
||||
Substitutes []*TPRequestSubstitute
|
||||
Substitutes []*TPAttributeSubstitute
|
||||
Weight float64
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user