mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Apply gofmt to make workflow pass
This commit is contained in:
committed by
Dan Christian Bogos
parent
d091ab7d03
commit
ef4a59c31e
@@ -31,7 +31,7 @@ func TestV1AccountAsAccount(t *testing.T) {
|
||||
Weight: 10,
|
||||
DestinationIds: "NAT",
|
||||
Timings: []*engine.RITiming{
|
||||
&engine.RITiming{
|
||||
{
|
||||
StartTime: "00:00:00",
|
||||
},
|
||||
},
|
||||
@@ -41,7 +41,7 @@ func TestV1AccountAsAccount(t *testing.T) {
|
||||
Weight: 10,
|
||||
DestinationIds: "NAT",
|
||||
Timings: []*engine.RITiming{
|
||||
&engine.RITiming{
|
||||
{
|
||||
StartTime: "00:00:00",
|
||||
},
|
||||
},
|
||||
@@ -49,12 +49,12 @@ func TestV1AccountAsAccount(t *testing.T) {
|
||||
v1Acc := &v1Account{
|
||||
Id: "*OUT:CUSTOMER_1:rif",
|
||||
BalanceMap: map[string]v1BalanceChain{
|
||||
utils.MetaData: v1BalanceChain{d1b},
|
||||
utils.MetaVoice: v1BalanceChain{v1b},
|
||||
utils.MetaMonetary: v1BalanceChain{&v1Balance{
|
||||
utils.MetaData: {d1b},
|
||||
utils.MetaVoice: {v1b},
|
||||
utils.MetaMonetary: {&v1Balance{
|
||||
Value: 21,
|
||||
Timings: []*engine.RITiming{
|
||||
&engine.RITiming{
|
||||
{
|
||||
StartTime: "00:00:00",
|
||||
},
|
||||
},
|
||||
@@ -70,7 +70,7 @@ func TestV1AccountAsAccount(t *testing.T) {
|
||||
RatingSubject: "",
|
||||
Categories: utils.NewStringMap(""),
|
||||
SharedGroups: utils.NewStringMap(""),
|
||||
Timings: []*engine.RITiming{&engine.RITiming{StartTime: "00:00:00"}},
|
||||
Timings: []*engine.RITiming{{StartTime: "00:00:00"}},
|
||||
TimingIDs: utils.NewStringMap(""),
|
||||
Factor: engine.ValueFactor{},
|
||||
}
|
||||
@@ -83,7 +83,7 @@ func TestV1AccountAsAccount(t *testing.T) {
|
||||
RatingSubject: "",
|
||||
Categories: utils.NewStringMap(""),
|
||||
SharedGroups: utils.NewStringMap(""),
|
||||
Timings: []*engine.RITiming{&engine.RITiming{StartTime: "00:00:00"}},
|
||||
Timings: []*engine.RITiming{{StartTime: "00:00:00"}},
|
||||
TimingIDs: utils.NewStringMap(""),
|
||||
Factor: engine.ValueFactor{},
|
||||
}
|
||||
@@ -95,16 +95,16 @@ func TestV1AccountAsAccount(t *testing.T) {
|
||||
RatingSubject: "",
|
||||
Categories: utils.NewStringMap(""),
|
||||
SharedGroups: utils.NewStringMap(""),
|
||||
Timings: []*engine.RITiming{&engine.RITiming{StartTime: "00:00:00"}},
|
||||
Timings: []*engine.RITiming{{StartTime: "00:00:00"}},
|
||||
TimingIDs: utils.NewStringMap(""),
|
||||
Factor: engine.ValueFactor{},
|
||||
}
|
||||
testAccount := &engine.Account{
|
||||
ID: "CUSTOMER_1:rif",
|
||||
BalanceMap: map[string]engine.Balances{
|
||||
utils.MetaData: engine.Balances{d2},
|
||||
utils.MetaVoice: engine.Balances{v2},
|
||||
utils.MetaMonetary: engine.Balances{m2},
|
||||
utils.MetaData: {d2},
|
||||
utils.MetaVoice: {v2},
|
||||
utils.MetaMonetary: {m2},
|
||||
},
|
||||
UnitCounters: engine.UnitCounters{},
|
||||
ActionTriggers: engine.ActionTriggers{},
|
||||
|
||||
@@ -35,7 +35,7 @@ func TestV1ActionPlanAsActionPlan(t *testing.T) {
|
||||
Id: "test",
|
||||
AccountIDs: utils.StringMap{"one": true},
|
||||
ActionTimings: []*engine.ActionTiming{
|
||||
&engine.ActionTiming{
|
||||
{
|
||||
Timing: &engine.RateInterval{
|
||||
Timing: new(engine.RITiming),
|
||||
},
|
||||
|
||||
@@ -131,10 +131,10 @@ func testAlsITMigrateAndMove(t *testing.T) {
|
||||
&v1AliasValue{
|
||||
DestinationId: "DST_1003",
|
||||
Pairs: map[string]map[string]string{
|
||||
"Account": map[string]string{
|
||||
"Account": {
|
||||
"1001": "1002",
|
||||
},
|
||||
"Category": map[string]string{
|
||||
"Category": {
|
||||
"call_1001": "call_1002",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -52,7 +52,7 @@ func TestAlias2AtttributeProfile(t *testing.T) {
|
||||
&v1AliasValue{
|
||||
DestinationId: utils.MetaAny,
|
||||
Pairs: map[string]map[string]string{
|
||||
"Account": map[string]string{
|
||||
"Account": {
|
||||
"1001": "1002",
|
||||
},
|
||||
},
|
||||
@@ -71,7 +71,7 @@ func TestAlias2AtttributeProfile(t *testing.T) {
|
||||
&v1AliasValue{
|
||||
DestinationId: utils.MetaAny,
|
||||
Pairs: map[string]map[string]string{
|
||||
"Account": map[string]string{
|
||||
"Account": {
|
||||
"1001": "1002",
|
||||
"1003": "1004",
|
||||
},
|
||||
@@ -91,7 +91,7 @@ func TestAlias2AtttributeProfile(t *testing.T) {
|
||||
&v1AliasValue{
|
||||
DestinationId: utils.MetaAny,
|
||||
Pairs: map[string]map[string]string{
|
||||
"Account": map[string]string{
|
||||
"Account": {
|
||||
"1001": "1002",
|
||||
"1003": "1004",
|
||||
},
|
||||
@@ -111,10 +111,10 @@ func TestAlias2AtttributeProfile(t *testing.T) {
|
||||
&v1AliasValue{
|
||||
DestinationId: "DST_1003",
|
||||
Pairs: map[string]map[string]string{
|
||||
"Account": map[string]string{
|
||||
"Account": {
|
||||
"": "1002",
|
||||
},
|
||||
"Subject": map[string]string{
|
||||
"Subject": {
|
||||
"": "call_1001",
|
||||
},
|
||||
},
|
||||
@@ -133,10 +133,10 @@ func TestAlias2AtttributeProfile(t *testing.T) {
|
||||
&v1AliasValue{
|
||||
DestinationId: "DST_1003",
|
||||
Pairs: map[string]map[string]string{
|
||||
"Account": map[string]string{
|
||||
"Account": {
|
||||
"1001": "1002",
|
||||
},
|
||||
"Category": map[string]string{
|
||||
"Category": {
|
||||
"call_1001": "call_1002",
|
||||
},
|
||||
},
|
||||
@@ -153,7 +153,7 @@ func TestAlias2AtttributeProfile(t *testing.T) {
|
||||
Values: v1AliasValues{
|
||||
&v1AliasValue{
|
||||
Pairs: map[string]map[string]string{
|
||||
utils.Category: map[string]string{
|
||||
utils.Category: {
|
||||
"somecateg_5141": "somecateg_roam_fromz4",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -59,7 +59,7 @@ func TestV1AttributeProfileAsAttributeProfile(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v2Attribute{
|
||||
&v2Attribute{
|
||||
{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -87,7 +87,7 @@ func TestV2AttributeProfileAsAttributeProfile(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v2Attribute{
|
||||
&v2Attribute{
|
||||
{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -106,7 +106,7 @@ func TestV2AttributeProfileAsAttributeProfile(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v3Attribute{
|
||||
&v3Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"},
|
||||
FieldName: "FL1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -133,7 +133,7 @@ func TestV2AttributeProfileAsAttributeProfile2(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v2Attribute{
|
||||
&v2Attribute{
|
||||
{
|
||||
FieldName: "FL1",
|
||||
Initial: nil,
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -152,7 +152,7 @@ func TestV2AttributeProfileAsAttributeProfile2(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v3Attribute{
|
||||
&v3Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:"},
|
||||
FieldName: "FL1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -179,7 +179,7 @@ func TestV3AttributeProfileAsAttributeProfile(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v3Attribute{
|
||||
&v3Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"},
|
||||
FieldName: "FL1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -197,7 +197,7 @@ func TestV3AttributeProfileAsAttributeProfile(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v4Attribute{
|
||||
&v4Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"},
|
||||
FieldName: "FL1",
|
||||
Type: utils.MetaVariable,
|
||||
@@ -225,7 +225,7 @@ func TestV4AttributeProfileAsAttributeProfile(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*v4Attribute{
|
||||
&v4Attribute{
|
||||
{
|
||||
FieldName: "FL1",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~Category:s/(.*)/${1}_UK_Mobile_Vodafone_GBRVF/", utils.InfieldSep),
|
||||
@@ -243,7 +243,7 @@ func TestV4AttributeProfileAsAttributeProfile(t *testing.T) {
|
||||
ExpiryTime: cloneExpTime,
|
||||
},
|
||||
Attributes: []*engine.Attribute{
|
||||
&engine.Attribute{
|
||||
{
|
||||
Path: utils.MetaReq + utils.NestingSep + "FL1",
|
||||
Type: utils.MetaVariable,
|
||||
Value: config.NewRSRParsersMustCompile("~*req.Category:s/(.*)/${1}_UK_Mobile_Vodafone_GBRVF/", utils.InfieldSep),
|
||||
@@ -294,7 +294,7 @@ func TestAsAttributeProfileV2(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*v2Attribute{
|
||||
&v2Attribute{
|
||||
{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Substitute: sbstPrsr,
|
||||
@@ -323,7 +323,7 @@ func TestAsAttributeProfileV3(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*v2Attribute{
|
||||
&v2Attribute{
|
||||
{
|
||||
FieldName: "FL1",
|
||||
Initial: "In1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -342,7 +342,7 @@ func TestAsAttributeProfileV3(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*v3Attribute{
|
||||
&v3Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"}, //here
|
||||
FieldName: "FL1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -367,7 +367,7 @@ func TestAsAttributeProfileV4(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*v3Attribute{
|
||||
&v3Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"},
|
||||
FieldName: "FL1",
|
||||
Substitute: config.NewRSRParsersMustCompile("Al1", utils.InfieldSep),
|
||||
@@ -385,7 +385,7 @@ func TestAsAttributeProfileV4(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*v4Attribute{
|
||||
&v4Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"},
|
||||
FieldName: "FL1",
|
||||
Type: utils.MetaVariable,
|
||||
@@ -414,7 +414,7 @@ func TestAsAttributeProfileV5(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*v4Attribute{
|
||||
&v4Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"},
|
||||
FieldName: "FL1",
|
||||
Type: utils.MetaVariable,
|
||||
@@ -434,7 +434,7 @@ func TestAsAttributeProfileV5(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*engine.Attribute{
|
||||
&engine.Attribute{
|
||||
{
|
||||
FilterIDs: []string{"*string:FL1:In1"},
|
||||
Path: utils.MetaReq + utils.NestingSep + "FL1",
|
||||
Type: utils.MetaVariable,
|
||||
@@ -487,7 +487,7 @@ func TestAsAttributeProfileV1To4(t *testing.T) {
|
||||
ExpiryTime: time.Date(2020, 4, 18, 14, 25, 0, 0, time.UTC),
|
||||
},
|
||||
Attributes: []*v4Attribute{
|
||||
&v4Attribute{
|
||||
{
|
||||
FieldName: "FL1",
|
||||
Type: utils.MetaVariable,
|
||||
Value: sbstPrsr,
|
||||
|
||||
@@ -182,7 +182,7 @@ func testRtPlITMigrateAndMove(t *testing.T) {
|
||||
Id: "RT_PLAN1",
|
||||
Timings: map[string]*engine.RITiming{},
|
||||
Ratings: map[string]*engine.RIRate{
|
||||
"asjkilj": &engine.RIRate{
|
||||
"asjkilj": {
|
||||
ConnectFee: 10,
|
||||
RoundingMethod: utils.MetaRoundingUp,
|
||||
RoundingDecimals: 1,
|
||||
|
||||
@@ -60,7 +60,7 @@ func TestV2toV3Cost(t *testing.T) {
|
||||
Tenant: "cgrates.org",
|
||||
ID: "1001",
|
||||
BalanceSummaries: []*engine.BalanceSummary{
|
||||
&engine.BalanceSummary{
|
||||
{
|
||||
UUID: "UUID",
|
||||
ID: "First",
|
||||
Type: utils.MetaMonetary,
|
||||
|
||||
@@ -29,14 +29,14 @@ func TestV1SharedGroupAsSharedGroup(t *testing.T) {
|
||||
v1sg := &v1SharedGroup{
|
||||
Id: "Test",
|
||||
AccountParameters: map[string]*engine.SharingParameters{
|
||||
"test": &engine.SharingParameters{Strategy: "*highest"},
|
||||
"test": {Strategy: "*highest"},
|
||||
},
|
||||
MemberIds: []string{"1", "2", "3"},
|
||||
}
|
||||
sg := &engine.SharedGroup{
|
||||
Id: "Test",
|
||||
AccountParameters: map[string]*engine.SharingParameters{
|
||||
"test": &engine.SharingParameters{Strategy: "*highest"},
|
||||
"test": {Strategy: "*highest"},
|
||||
},
|
||||
MemberIds: utils.NewStringMap("1", "2", "3"),
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func testTpStatsITPopulate(t *testing.T) {
|
||||
},
|
||||
TTL: "1",
|
||||
Metrics: []*utils.MetricWithFilters{
|
||||
&utils.MetricWithFilters{
|
||||
{
|
||||
MetricID: "*sum#Param1",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user