one more test

This commit is contained in:
Radu Ioan Fericean
2014-09-02 22:11:26 +03:00
parent fa7b97b5dc
commit 90f77cf158
3 changed files with 15 additions and 2 deletions

View File

@@ -60,6 +60,20 @@ func TestTransactionRollback(t *testing.T) {
}
}
func TestTransactionRemBefore(t *testing.T) {
BeginTransaction()
RemPrefixKey("t41_")
Cache("t41_mm", "test")
Cache("t41_nn", "test")
CommitTransaction()
if t1, err := GetCached("t41_mm"); err != nil || t1 != "test" {
t.Error("Error commiting transaction")
}
if t1, err := GetCached("t41_nn"); err != nil || t1 != "test" {
t.Error("Error in transaction cache")
}
}
func TestRemPrefixKey(t *testing.T) {
Cache("x_t1", "test")
Cache("y_t1", "test")

View File

@@ -35,7 +35,7 @@ const (
RECURSION_MAX_DEPTH = 3
MIN_PREFIX_MATCH = 1
FALLBACK_SUBJECT = utils.ANY
DEBUG = true
DEBUG = false
)
func init() {

View File

@@ -158,7 +158,6 @@ const (
CREATE_CDRS_TABLES_SQL = "create_cdrs_tables.sql"
CREATE_TARIFFPLAN_TABLES_SQL = "create_tariffplan_tables.sql"
TEST_SQL = "TEST_SQL"
TP_ID_SEP = ":"
)
var (