diff --git a/builtin/providers/aws/tags_test.go b/builtin/providers/aws/tags_test.go index eb30f346e..6e89492ca 100644 --- a/builtin/providers/aws/tags_test.go +++ b/builtin/providers/aws/tags_test.go @@ -53,10 +53,10 @@ func TestDiffTags(t *testing.T) { cm := tagsToMap(c) rm := tagsToMap(r) if !reflect.DeepEqual(cm, tc.Create) { - t.Fatalf("%i: bad create: %#v", i, cm) + t.Fatalf("%d: bad create: %#v", i, cm) } if !reflect.DeepEqual(rm, tc.Remove) { - t.Fatalf("%i: bad remove: %#v", i, rm) + t.Fatalf("%d: bad remove: %#v", i, rm) } } } diff --git a/config/config_test.go b/config/config_test.go index 1574ba83a..7b7348fd9 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -98,7 +98,7 @@ func TestConfigValidate_countUserVar(t *testing.T) { func TestConfigValidate_countVar(t *testing.T) { c := testConfig(t, "validate-count-var") if err := c.Validate(); err != nil { - t.Fatal("err: %s", err) + t.Fatalf("err: %s", err) } } @@ -154,7 +154,7 @@ func TestConfigValidate_outputBadField(t *testing.T) { func TestConfigValidate_pathVar(t *testing.T) { c := testConfig(t, "validate-path-var") if err := c.Validate(); err != nil { - t.Fatal("err: %s", err) + t.Fatalf("err: %s", err) } } diff --git a/config/module/get_file_test.go b/config/module/get_file_test.go index 7cc69bccb..4c9f6126a 100644 --- a/config/module/get_file_test.go +++ b/config/module/get_file_test.go @@ -88,7 +88,7 @@ func TestFileGetter_dirSymlink(t *testing.T) { // Make a symlink if err := os.Symlink(dst2, dst); err != nil { - t.Fatalf("err: %s") + t.Fatalf("err: %s", err) } // With a dir that exists that isn't a symlink diff --git a/helper/schema/schema.go b/helper/schema/schema.go index 7cd0fe711..be5a56aa3 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -338,7 +338,7 @@ func (m schemaMap) Input( case TypeString: value, err = m.inputString(input, k, v) default: - panic(fmt.Sprintf("Unknown type for input: %s", v.Type)) + panic(fmt.Sprintf("Unknown type for input: %#v", v.Type)) } if err != nil { @@ -653,7 +653,7 @@ func (m schemaMap) diffString( var err error n, err = schema.DefaultFunc() if err != nil { - return fmt.Errorf("%s, error loading default: %s", err) + return fmt.Errorf("%s, error loading default: %s", k, err) } } } @@ -909,7 +909,7 @@ func (m schemaMap) validatePrimitive( return nil, []error{err} } default: - panic(fmt.Sprintf("Unknown validation type: %s", schema.Type)) + panic(fmt.Sprintf("Unknown validation type: %#v", schema.Type)) } return nil, nil diff --git a/terraform/context.go b/terraform/context.go index e2d8bbd33..81735063f 100644 --- a/terraform/context.go +++ b/terraform/context.go @@ -175,7 +175,7 @@ func (c *Context) Input(mode InputMode) error { case config.VariableTypeString: // Good! default: - panic(fmt.Sprintf("Unknown variable type: %s", v.Type())) + panic(fmt.Sprintf("Unknown variable type: %#v", v.Type())) } var defaultString string @@ -483,7 +483,7 @@ func (c *walkContext) Walk() error { case walkValidate: walkFn = c.validateWalkFn() default: - panic(fmt.Sprintf("unknown operation: %s", c.Operation)) + panic(fmt.Sprintf("unknown operation: %#v", c.Operation)) } if err := g.Walk(walkFn); err != nil { diff --git a/terraform/diff_test.go b/terraform/diff_test.go index dcee2b335..47e78c5e8 100644 --- a/terraform/diff_test.go +++ b/terraform/diff_test.go @@ -97,7 +97,7 @@ func TestModuleDiff_ChangeType(t *testing.T) { for i, tc := range cases { actual := tc.Diff.ChangeType() if actual != tc.Result { - t.Fatalf("%d: %s", i, actual) + t.Fatalf("%d: %#v", i, actual) } } } @@ -232,7 +232,7 @@ func TestInstanceDiff_ChangeType(t *testing.T) { for i, tc := range cases { actual := tc.Diff.ChangeType() if actual != tc.Result { - t.Fatalf("%d: %s", i, actual) + t.Fatalf("%d: %#v", i, actual) } } }