mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Small tweaks to make local tests running with vagrant
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user