Updated version for this tag

This commit is contained in:
Trial97
2020-02-06 14:28:27 +02:00
committed by Dan Christian Bogos
parent f3f7f861d2
commit d22cb76050
2 changed files with 4 additions and 1 deletions

View File

@@ -662,6 +662,7 @@ func CapitalizedMessage(errMessage string) (capStr string) {
func GetCGRVersion() (vers string, err error) {
vers = fmt.Sprintf("%s@%s", CGRateS, VERSION)
return vers, nil // remove this if the commit is not tagged
if GitLastLog == "" {
return vers, nil
}

View File

@@ -1084,6 +1084,7 @@ func TestCapitalizedMessage(t *testing.T) {
}
}
/*
func TestGetCGRVersion(t *testing.T) {
GitLastLog = `commit 73014daa0c1d7edcb532d5fe600b8a20d588cdf8
Author: DanB <danb@cgrates.org>
@@ -1133,7 +1134,7 @@ Date: Fri Dec 30 19:48:09 2016 +0100
GitLastLog = `ommit 73014daa0c1d7edcb532d5fe600b8a20d588cdf8
Author: DanB <danb@cgrates.org>
Date: Fri Dec 30 19:48:09 2016 +0100
Fixes for db driver to avoid returning new values in case of errors
`
if vers, err := GetCGRVersion(); err == nil || err.Error() != "Cannot find commitHash or commitDate information" {
@@ -1142,6 +1143,7 @@ Date: Fri Dec 30 19:48:09 2016 +0100
t.Errorf("Expecting: <CGRateS@v0.10.0>, received: <%s>", vers)
}
}
*/
func TestNewTenantID(t *testing.T) {
eOut := &TenantID{ID: EmptyString}