Fix oracle-bmcs tests panicing instead of failing

Replace use of t.Errorf with t.Fatalf to prevent subsequent panic on nil
pointer access.
This commit is contained in:
Andrew Pryde 2017-02-13 12:51:01 +00:00
parent 7dcd7cac47
commit 7eb3f30d50
1 changed files with 4 additions and 4 deletions

View File

@ -75,7 +75,7 @@ func TestConfig(t *testing.T) {
_, errs := NewConfig(raw)
if errs != nil {
t.Errorf("err: %+v", errs)
t.Fatalf("err: %+v", errs)
}
})
@ -109,7 +109,7 @@ func TestConfig(t *testing.T) {
_, errs := NewConfig(raw)
if errs != nil {
t.Errorf("err: %+v", errs)
t.Fatalf("err: %+v", errs)
}
})
@ -118,7 +118,7 @@ func TestConfig(t *testing.T) {
raw := testConfig(cfgFile)
c, errs := NewConfig(raw)
if errs != nil {
t.Errorf("err: %+v", errs)
t.Fatalf("err: %+v", errs)
}
expected := "ocid1.tenancy.oc1..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@ -164,7 +164,7 @@ func TestConfig(t *testing.T) {
c, errs := NewConfig(raw)
if errs != nil {
t.Errorf("err: %+v", errs)
t.Fatalf("err: %+v", errs)
}
accessVal := getField(c.AccessCfg, v)