fix unit test

pull/6888/head
Sharif Elgamal 2020-03-04 14:43:42 -08:00
parent 2db0b8cea2
commit eccb1d5e0a
1 changed files with 5 additions and 2 deletions

View File

@ -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())
}