diff --git a/.travis.yml b/.travis.yml index 099f91188..8d00edf27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.14 + - 1.15 script: go test -v ./... diff --git a/go.mod b/go.mod index ced846064..bd0fca4fb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cgrates/cgrates -go 1.14 +go 1.15 // replace github.com/cgrates/radigo => /home/dan/go/src/github.com/cgrates/radigo // replace github.com/cgrates/rpcclient => ../rpcclient diff --git a/utils/apitpdata_test.go b/utils/apitpdata_test.go index 13d34e21d..fc06add02 100644 --- a/utils/apitpdata_test.go +++ b/utils/apitpdata_test.go @@ -111,7 +111,7 @@ func TestNewRateSlot(t *testing.T) { eOut.RateUnit = "a" rcv, err = NewRateSlot(eOut.ConnectFee, eOut.Rate, eOut.RateUnit, eOut.RateIncrement, eOut.GroupIntervalStart) //must receive from time an error: "invalid duration a" - if err == nil || err.Error() != "time: invalid duration a" { + if err == nil || err.Error() != "time: invalid duration \"a\"" { t.Error(err) } } @@ -128,19 +128,19 @@ func TestSetDurations(t *testing.T) { } rs.RateUnit = "a" //at RateUnit if, must receive from time an error: "invalid duration a" - if err := rs.SetDurations(); err == nil || err.Error() != "time: invalid duration a" { + if err := rs.SetDurations(); err == nil || err.Error() != "time: invalid duration \"a\"" { t.Error(err) } rs.RateUnit = "1" rs.RateIncrement = "a" //at RateIncrement, must receive from time an error: "invalid duration a" - if err := rs.SetDurations(); err == nil || err.Error() != "time: invalid duration a" { + if err := rs.SetDurations(); err == nil || err.Error() != "time: invalid duration \"a\"" { t.Error(err) } rs.RateIncrement = "1" rs.GroupIntervalStart = "a" //at GroupIntervalStart, must receive from time an error: "invalid duration a" - if err := rs.SetDurations(); err == nil || err.Error() != "time: invalid duration a" { + if err := rs.SetDurations(); err == nil || err.Error() != "time: invalid duration \"a\"" { t.Error(err) } } diff --git a/utils/basic_auth_test.go b/utils/basic_auth_test.go index 2ff3050cf..b2caa9c66 100644 --- a/utils/basic_auth_test.go +++ b/utils/basic_auth_test.go @@ -145,7 +145,7 @@ func TestVerifyCredential(t *testing.T) { {"foo", "bar", map[string]string{"test": "1234", "foo": hashedPasswords["bar"]}, true}, {"foo", "1234", map[string]string{"test": "1234", "foo": hashedPasswords["bar"]}, false}, {"none", "1234", map[string]string{"test": "1234", "foo": hashedPasswords["bar"]}, false}, - {"test", "1234", map[string]string{"test": "1234" + string(0), "foo": hashedPasswords["bar"]}, false}, + {"test", "1234", map[string]string{"test": "12340", "foo": hashedPasswords["bar"]}, false}, } for _, tt := range verifyCredentialTests { diff --git a/utils/dataconverter_test.go b/utils/dataconverter_test.go index ae9564071..b7dd8a699 100644 --- a/utils/dataconverter_test.go +++ b/utils/dataconverter_test.go @@ -170,14 +170,14 @@ func TestNewDurationSecondsConverter(t *testing.T) { func TestDurationSecondsConverterConvert(t *testing.T) { mS := &DurationSecondsConverter{} - if _, err := mS.Convert("string"); err.Error() != "time: invalid duration string" { + if _, err := mS.Convert("string"); err.Error() != "time: invalid duration \"string\"" { t.Error(err) } } func TestDurationNanosecondsConverterConvert(t *testing.T) { nS := &DurationNanosecondsConverter{} - if _, err := nS.Convert("string"); err.Error() != "time: invalid duration string" { + if _, err := nS.Convert("string"); err.Error() != "time: invalid duration \"string\"" { t.Error(err) } }