mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
more aliases tests
This commit is contained in:
@@ -741,6 +741,19 @@ func TestLoadAccountActions(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadAliases(t *testing.T) {
|
||||
if len(csvr.aliases) != 5 {
|
||||
t.Error("Failed to load aliases: ", csvr.aliases)
|
||||
}
|
||||
if csvr.aliases[RATING_PROFILE_PREFIX+"a1"] != "minu" ||
|
||||
csvr.aliases[RATING_PROFILE_PREFIX+"a2"] != "minu" ||
|
||||
csvr.aliases[RATING_PROFILE_PREFIX+"a3"] != "minu" ||
|
||||
csvr.aliases[ACCOUNT_PREFIX+"a1"] != "minitsboy" ||
|
||||
csvr.aliases[ACCOUNT_PREFIX+"a2"] != "minitsboy" {
|
||||
t.Error("Error loading aliases: ", csvr.aliases)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
vdf,minitsboy,*out,MORE_MINUTES,STANDARD_TRIGGER
|
||||
*/
|
||||
|
||||
@@ -21,6 +21,8 @@ package engine
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
)
|
||||
|
||||
func TestMsgpackStructsAdded(t *testing.T) {
|
||||
@@ -107,6 +109,12 @@ func TestCacheRefresh(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCacheAliases(t *testing.T) {
|
||||
if subj, err := cache2go.GetCached(ALIAS_PREFIX + RATING_PROFILE_PREFIX + "a3"); err != nil || subj != "minu" {
|
||||
t.Error("Error caching alias: ", subj, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Install fails to detect them and starting server will panic, these tests will fix this
|
||||
func TestStoreInterfaces(t *testing.T) {
|
||||
rds := new(RedisStorage)
|
||||
|
||||
Reference in New Issue
Block a user