Small tweaks to make local tests running with vagrant

This commit is contained in:
DanB
2014-03-18 14:55:46 +00:00
parent 3892d9ed20
commit 6017827059
3 changed files with 9 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import (
"github.com/cgrates/cgrates/utils"
"io/ioutil"
"os/exec"
"os"
"path"
"testing"
"time"
@@ -119,6 +120,12 @@ func TestCreateCdrFiles(t *testing.T) {
if !*testLocal {
return
}
if err := os.RemoveAll(cfg.CdrcCdrInDir); err != nil {
t.Fatal("Error removing folder: ", cfg.CdrcCdrInDir, err)
}
if err := os.MkdirAll(cfg.CdrcCdrInDir, 0755); err != nil {
t.Fatal("Error creating folder: ", cfg.CdrcCdrInDir, err)
}
if err := ioutil.WriteFile(path.Join(cfg.CdrcCdrInDir, "file1.csv"), []byte(fileContent1), 0644); err != nil {
t.Fatal(err.Error)
}

View File

@@ -15,7 +15,7 @@ enabled = true # Start the CDR Server service: <true|false>.
mediator = internal # Address where to reach the Mediator. Empty for disabling mediation. <""|internal>
[cdre]
export_dir = /tmp/cgrates/cdr/cdrexport/csv # Path where the exported CDRs will be placed
export_dir = /tmp/cgrates/cdr/cdre/csv # Path where the exported CDRs will be placed
[cdrc]
cdr_in_dir = /tmp/cgrates/cdr/cdrc/in # Absolute path towards the directory where the CDRs are stored.

View File

@@ -23,7 +23,7 @@ DAEMON=/usr/bin/cgr-engine
USER=cgrates
GROUP=cgrates
TUTFOLDER=/usr/share/cgrates/tutorials/fs_json/cgrates
ENGINE_OPTS=-config=$TUTFOLDER/etc/cgrates/cgrates.cfg
ENGINE_OPTS="-config=$TUTFOLDER/etc/cgrates/cgrates.cfg"
PIDFILE=/tmp/cgr-engine_tutfsjson.pid
SCRIPTNAME=$TUTFOLDER/etc/init.d/$NAME
DEFAULTS=$TUTFOLDER/etc/default/$NAME