diff --git a/config/config_test.go b/config/config_test.go index 5dd1d6f38..0a70f3934 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -123,7 +123,7 @@ func TestDefaults(t *testing.T) { eCfg.SMRater = "127.0.0.1:2012" eCfg.SMRaterReconnects = 3 eCfg.SMDebitInterval = 10 - eCfg.SMMaxCallDuration = time.Time(3) * time.Hour + eCfg.SMMaxCallDuration = time.Duration(3) * time.Hour eCfg.FreeswitchServer = "127.0.0.1:8021" eCfg.FreeswitchPass = "ClueCon" eCfg.FreeswitchReconnects = 5 @@ -246,7 +246,7 @@ func TestConfigFromFile(t *testing.T) { eCfg.SMRater = "test" eCfg.SMRaterReconnects = 99 eCfg.SMDebitInterval = 99 - eCfg.SMMaxCallDuration = "test" + eCfg.SMMaxCallDuration = time.Duration(99)*time.Second eCfg.FreeswitchServer = "test" eCfg.FreeswitchPass = "test" eCfg.FreeswitchReconnects = 99 diff --git a/config/test_data.txt b/config/test_data.txt index f3372761a..0b820a81c 100644 --- a/config/test_data.txt +++ b/config/test_data.txt @@ -96,7 +96,7 @@ switch_type = test # Defines the type of switch behind: . rater = test # Address where to reach the Rater. rater_reconnects = 99 # Number of reconnects to rater before giving up. debit_interval = 99 # Interval to perform debits on. -max_call_duration = test # Maximum call duration a prepaid call can last +max_call_duration = 99 # Maximum call duration a prepaid call can last [freeswitch] server = test # Adress where to connect to FreeSWITCH socket.