mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 14:48:43 +05:00
Fix Actions.Clone(), activate test
This commit is contained in:
@@ -89,23 +89,21 @@ type actionTypeFunc func(*Account, *StatsQueueTriggered, *Action, Actions) error
|
||||
|
||||
func getActionFunc(typ string) (actionTypeFunc, bool) {
|
||||
actionFuncMap := map[string]actionTypeFunc{
|
||||
LOG: logAction,
|
||||
CDRLOG: cdrLogAction,
|
||||
RESET_TRIGGERS: resetTriggersAction,
|
||||
SET_RECURRENT: setRecurrentAction,
|
||||
UNSET_RECURRENT: unsetRecurrentAction,
|
||||
ALLOW_NEGATIVE: allowNegativeAction,
|
||||
DENY_NEGATIVE: denyNegativeAction,
|
||||
RESET_ACCOUNT: resetAccountAction,
|
||||
TOPUP_RESET: topupResetAction,
|
||||
TOPUP: topupAction,
|
||||
DEBIT_RESET: debitResetAction,
|
||||
DEBIT: debitAction,
|
||||
RESET_COUNTERS: resetCountersAction,
|
||||
ENABLE_ACCOUNT: enableAccountAction,
|
||||
DISABLE_ACCOUNT: disableAccountAction,
|
||||
//case ENABLE_DISABLE_BALANCE:
|
||||
// return enableDisableBalanceAction, true
|
||||
LOG: logAction,
|
||||
CDRLOG: cdrLogAction,
|
||||
RESET_TRIGGERS: resetTriggersAction,
|
||||
SET_RECURRENT: setRecurrentAction,
|
||||
UNSET_RECURRENT: unsetRecurrentAction,
|
||||
ALLOW_NEGATIVE: allowNegativeAction,
|
||||
DENY_NEGATIVE: denyNegativeAction,
|
||||
RESET_ACCOUNT: resetAccountAction,
|
||||
TOPUP_RESET: topupResetAction,
|
||||
TOPUP: topupAction,
|
||||
DEBIT_RESET: debitResetAction,
|
||||
DEBIT: debitAction,
|
||||
RESET_COUNTERS: resetCountersAction,
|
||||
ENABLE_ACCOUNT: enableAccountAction,
|
||||
DISABLE_ACCOUNT: disableAccountAction,
|
||||
CALL_URL: callUrl,
|
||||
CALL_URL_ASYNC: callUrlAsync,
|
||||
MAIL_ASYNC: mailAsync,
|
||||
@@ -748,8 +746,7 @@ func (apl Actions) Sort() {
|
||||
sort.Sort(apl)
|
||||
}
|
||||
|
||||
func (apl *Actions) Clone() (interface{}, error) {
|
||||
|
||||
func (apl Actions) Clone() (interface{}, error) {
|
||||
var cln Actions
|
||||
if err := utils.Clone(apl, &cln); err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -65,7 +65,7 @@ func (apl *ActionPlan) Clone() (interface{}, error) {
|
||||
if err := utils.Clone(*apl, cln); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return interface{}(cln), nil
|
||||
return cln, nil
|
||||
}
|
||||
|
||||
func (t *Task) Execute() error {
|
||||
|
||||
@@ -2373,7 +2373,6 @@ func TestClonedActions(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
func TestCacheGetClonedActions(t *testing.T) {
|
||||
actions := Actions{
|
||||
&Action{
|
||||
@@ -2408,8 +2407,6 @@ func TestCacheGetClonedActions(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/**************** Benchmarks ********************************/
|
||||
|
||||
func BenchmarkUUID(b *testing.B) {
|
||||
|
||||
Reference in New Issue
Block a user