mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 07:26:48 +00:00
rpcserver/exchanges: Add additional param checks plus other minor bugfixes/improvements (#652)
* deleting the unwanted file created during testing + adding more verbose errors for cli * wip * checking params throughout wip * improving errors * wip * thrasher patch * better err name * whip * testing and fixing errors WIP * upgrades and better errors * broken test * wip * adding some tests * using tempDir * mini improvement * little changes * better time check * fixing error * more glorious changes * end of day wip * shazzy changes * checking error * appveyor * last changes:
This commit is contained in:
@@ -135,5 +135,5 @@ type LiveData struct {
|
||||
APISecretOverride string `json:"api-secret-override"`
|
||||
APIClientIDOverride string `json:"api-client-id-override"`
|
||||
API2FAOverride string `json:"api-2fa-override"`
|
||||
RealOrders bool `json:"fake-orders"`
|
||||
RealOrders bool `json:"real-orders"`
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"api-secret-override": "",
|
||||
"api-client-id-override": "",
|
||||
"api-2fa-override": "",
|
||||
"fake-orders": false
|
||||
"real-orders": false
|
||||
}
|
||||
},
|
||||
"portfolio-settings": {
|
||||
|
||||
@@ -2,6 +2,8 @@ package report
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -23,7 +25,11 @@ func TestGenerateReport(t *testing.T) {
|
||||
e := testExchange
|
||||
a := asset.Spot
|
||||
p := currency.NewPair(currency.BTC, currency.USDT)
|
||||
|
||||
tempDir, err := ioutil.TempDir("", "")
|
||||
if err != nil {
|
||||
t.Fatalf("Problem creating temp dir at %s: %s\n", tempDir, err)
|
||||
}
|
||||
defer os.RemoveAll(tempDir)
|
||||
d := Data{
|
||||
Config: &config.Config{},
|
||||
OutputPath: filepath.Join("..", "results"),
|
||||
@@ -290,7 +296,8 @@ func TestGenerateReport(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
err := d.GenerateReport()
|
||||
d.OutputPath = tempDir
|
||||
err = d.GenerateReport()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user