From 72f4d53f7f97b875978eae3224e9128fce28f64d Mon Sep 17 00:00:00 2001 From: DanB Date: Thu, 1 Dec 2016 17:24:56 +0100 Subject: [PATCH] Updating contributors file, update tutorial test with cleanup of the exported file --- CONTRIBUTORS.md | 1 - general_tests/tutorial_it_test.go | 7 ++++++- utils/apitpdata.go | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c21e7f150..baa9e8186 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -49,7 +49,6 @@ information, please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file. | @marcinkowalczyk | Marcin Kowalczyk | | @andmar | André Maricato | | @brendangilmore | Brendan Gilmore | -| @afone-lboue | Ludovic Boué | | @shaneneuerburg | Shane Neuerburg | | @Edwardro22 | Eduard Tamşa | | @KuikenArjan | Arjan Kuiken | diff --git a/general_tests/tutorial_it_test.go b/general_tests/tutorial_it_test.go index 6c29b18c0..b89c6740f 100644 --- a/general_tests/tutorial_it_test.go +++ b/general_tests/tutorial_it_test.go @@ -24,6 +24,7 @@ import ( "io/ioutil" "net/rpc" "net/rpc/jsonrpc" + "os" "path" "reflect" "testing" @@ -1387,11 +1388,15 @@ func TestTutITExportCDR(t *testing.T) { eExportContent := `f0a92222a7d21b4d9f72744aabe82daef52e20d8,*default,testexportcdr1,*rated,cgrates.org,call,1001,1003,2016-11-30T18:06:04+01:00,98,1.3334,RETA f0a92222a7d21b4d9f72744aabe82daef52e20d8,derived_run1,testexportcdr1,*rated,cgrates.org,call,1001,1003,2016-11-30T18:06:04+01:00,98,1.3334,RETA ` - if expContent, err := ioutil.ReadFile(path.Join(*exportArgs.ExportDirectory, *exportArgs.ExportFileName)); err != nil { + expFilePath := path.Join(*exportArgs.ExportDirectory, *exportArgs.ExportFileName) + if expContent, err := ioutil.ReadFile(expFilePath); err != nil { t.Error(err) } else if eExportContent != string(expContent) { t.Errorf("Expecting: <%q>, received: <%q>", eExportContent, string(expContent)) } + if err := os.Remove(expFilePath); err != nil { + t.Error(err) + } } diff --git a/utils/apitpdata.go b/utils/apitpdata.go index 1e7af65ec..b07f95dd1 100644 --- a/utils/apitpdata.go +++ b/utils/apitpdata.go @@ -184,7 +184,6 @@ func (self *TPRatingPlanBinding) Timing() *TPTiming { // Used to rebuild a TPRatingProfile (empty RatingPlanActivations) out of it's key in nosqldb func NewTPRatingProfileFromKeyId(tpid, loadId, keyId string) (*TPRatingProfile, error) { - // *out:cgrates.org:call:*any s := strings.Split(keyId, ":") if len(s) != 4 { return nil, fmt.Errorf("Cannot parse key %s into RatingProfile", keyId)