fix unit test
parent
2db0b8cea2
commit
eccb1d5e0a
|
|
@ -18,6 +18,7 @@ package config
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"reflect"
|
||||
|
|
@ -43,10 +44,10 @@ var configTestCases = []configTestCase{
|
|||
"ReminderWaitPeriodInHours": 99,
|
||||
"cpus": 4,
|
||||
"disk-size": "20g",
|
||||
"driver": "test-driver",
|
||||
"log_dir": "/etc/hosts",
|
||||
"show-libmachine-logs": true,
|
||||
"v": 5,
|
||||
"driver": "test-driver"
|
||||
"v": 5
|
||||
}`,
|
||||
config: map[string]interface{}{
|
||||
"driver": "test-driver",
|
||||
|
|
@ -179,6 +180,8 @@ func TestEncode(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Errorf("Error encoding: %v", err)
|
||||
}
|
||||
fmt.Printf("%+v\n", b.String())
|
||||
fmt.Printf("%+v\n", tt.data)
|
||||
if b.String() != tt.data {
|
||||
t.Errorf("Did not write config correctly, \n\n expected:\n %+v \n\n actual:\n %+v", tt.data, b.String())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue