diff --git a/builtin/providers/aws/resource_aws_opsworks_application_test.go b/builtin/providers/aws/resource_aws_opsworks_application_test.go index 78e48cacb..f1388d080 100644 --- a/builtin/providers/aws/resource_aws_opsworks_application_test.go +++ b/builtin/providers/aws/resource_aws_opsworks_application_test.go @@ -172,7 +172,7 @@ func testAccCheckAWSOpsworksCreateAppAttributes( opsapp *opsworks.App) resource.TestCheckFunc { return func(s *terraform.State) error { if *opsapp.EnableSsl { - return fmt.Errorf("Unexpected enable ssl: %s", *opsapp.EnableSsl) + return fmt.Errorf("Unexpected enable ssl: %t", *opsapp.EnableSsl) } if *opsapp.Attributes["DocumentRoot"] != "foo" { @@ -215,7 +215,7 @@ func testAccCheckAWSOpsworksUpdateAppAttributes( } if !*opsapp.EnableSsl { - return fmt.Errorf("Unexpected enable ssl: %s", *opsapp.EnableSsl) + return fmt.Errorf("Unexpected enable ssl: %t", *opsapp.EnableSsl) } if *opsapp.SslConfiguration.Certificate != "-----BEGIN CERTIFICATE-----\nMIIBkDCB+gIJALoScFD0sJq3MA0GCSqGSIb3DQEBBQUAMA0xCzAJBgNVBAYTAkRF\nMB4XDTE1MTIxOTIwMzU1MVoXDTE2MDExODIwMzU1MVowDTELMAkGA1UEBhMCREUw\ngZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKKQKbTTH/Julz16xY7ArYlzJYCP\nedTCx1bopuryCx/+d1gC94MtRdlPSpQl8mfc9iBdtXbJppp73Qh/DzLzO9Ns25xZ\n+kUQMhbIyLsaCBzuEGLgAaVdGpNvRBw++UoYtd0U7QczFAreTGLH8n8+FIzuI5Mc\n+MJ1TKbbt5gFfRSzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEALARo96wCDmaHKCaX\nS0IGLGnZCfiIUfCmBxOXBSJxDBwter95QHR0dMGxYIujee5n4vvavpVsqZnfMC3I\nOZWPlwiUJbNIpK+04Bg2vd5m/NMMrvi75RfmyeMtSfq/NrIX2Q3+nyWI7DLq7yZI\nV/YEvOqdAiy5NEWBztHx8HvB9G4=\n-----END CERTIFICATE-----" { @@ -234,7 +234,7 @@ func testAccCheckAWSOpsworksUpdateAppAttributes( } if !reflect.DeepEqual(expectedAttrs, opsapp.Attributes) { - return fmt.Errorf("Unnexpected Attributes: %s", opsapp.Attributes) + return fmt.Errorf("Unnexpected Attributes: %v", aws.StringValueMap(opsapp.Attributes)) } expectedAppSource := &opsworks.Source{ @@ -270,7 +270,7 @@ func testAccCheckAWSOpsworksUpdateAppAttributes( } if !reflect.DeepEqual(expectedDomains, opsapp.Domains) { - return fmt.Errorf("Unnexpected Daomins : %s", opsapp.Domains) + return fmt.Errorf("Unnexpected Daomins : %v", aws.StringValueSlice(opsapp.Domains)) } return nil diff --git a/builtin/providers/aws/resource_aws_opsworks_custom_layer_test.go b/builtin/providers/aws/resource_aws_opsworks_custom_layer_test.go index 1969e66c4..1767b609f 100644 --- a/builtin/providers/aws/resource_aws_opsworks_custom_layer_test.go +++ b/builtin/providers/aws/resource_aws_opsworks_custom_layer_test.go @@ -185,23 +185,23 @@ func testAccCheckAWSOpsworksCreateLayerAttributes( if *opslayer.AutoAssignElasticIps { return fmt.Errorf( - "Unexpected AutoAssignElasticIps: %s", *opslayer.AutoAssignElasticIps) + "Unexpected AutoAssignElasticIps: %t", *opslayer.AutoAssignElasticIps) } if !*opslayer.EnableAutoHealing { return fmt.Errorf( - "Unexpected EnableAutoHealing: %s", *opslayer.EnableAutoHealing) + "Unexpected EnableAutoHealing: %t", *opslayer.EnableAutoHealing) } if !*opslayer.LifecycleEventConfiguration.Shutdown.DelayUntilElbConnectionsDrained { return fmt.Errorf( - "Unexpected DelayUntilElbConnectionsDrained: %s", + "Unexpected DelayUntilElbConnectionsDrained: %t", *opslayer.LifecycleEventConfiguration.Shutdown.DelayUntilElbConnectionsDrained) } if *opslayer.LifecycleEventConfiguration.Shutdown.ExecutionTimeout != 300 { return fmt.Errorf( - "Unexpected ExecutionTimeout: %s", + "Unexpected ExecutionTimeout: %d", *opslayer.LifecycleEventConfiguration.Shutdown.ExecutionTimeout) } @@ -215,7 +215,7 @@ func testAccCheckAWSOpsworksCreateLayerAttributes( } if !reflect.DeepEqual(expectedPackages, opslayer.Packages) { - return fmt.Errorf("Unexpected Packages: %s", opslayer.Packages) + return fmt.Errorf("Unexpected Packages: %v", aws.StringValueSlice(opslayer.Packages)) } expectedEbsVolumes := []*opsworks.VolumeConfiguration{ diff --git a/builtin/providers/aws/resource_aws_opsworks_permission_test.go b/builtin/providers/aws/resource_aws_opsworks_permission_test.go index e0969cb3f..e1d3c1b8f 100644 --- a/builtin/providers/aws/resource_aws_opsworks_permission_test.go +++ b/builtin/providers/aws/resource_aws_opsworks_permission_test.go @@ -130,11 +130,11 @@ func testAccCheckAWSOpsworksCreatePermissionAttributes( opsperm *opsworks.Permission, allowSsh bool, allowSudo bool, level string) resource.TestCheckFunc { return func(s *terraform.State) error { if *opsperm.AllowSsh != allowSsh { - return fmt.Errorf("Unnexpected allowSsh: %s", *opsperm.AllowSsh) + return fmt.Errorf("Unnexpected allowSsh: %t", *opsperm.AllowSsh) } if *opsperm.AllowSudo != allowSudo { - return fmt.Errorf("Unnexpected allowSudo: %s", *opsperm.AllowSudo) + return fmt.Errorf("Unnexpected allowSudo: %t", *opsperm.AllowSudo) } if *opsperm.Level != level { diff --git a/builtin/providers/aws/resource_aws_opsworks_stack_test.go b/builtin/providers/aws/resource_aws_opsworks_stack_test.go index e8de10407..4c3b4b37a 100644 --- a/builtin/providers/aws/resource_aws_opsworks_stack_test.go +++ b/builtin/providers/aws/resource_aws_opsworks_stack_test.go @@ -257,7 +257,7 @@ func testAccCheckAWSOpsworksCreateStackAttributes( } if *opsstack.UseOpsworksSecurityGroups { - return fmt.Errorf("Unnexpected UseOpsworksSecurityGroups: %s", *opsstack.UseOpsworksSecurityGroups) + return fmt.Errorf("Unnexpected UseOpsworksSecurityGroups: %t", *opsstack.UseOpsworksSecurityGroups) } return nil @@ -292,11 +292,11 @@ func testAccCheckAWSOpsworksUpdateStackAttributes( } if !*opsstack.UseCustomCookbooks { - return fmt.Errorf("Unnexpected UseCustomCookbooks: %s", *opsstack.UseCustomCookbooks) + return fmt.Errorf("Unnexpected UseCustomCookbooks: %t", *opsstack.UseCustomCookbooks) } if !*opsstack.ChefConfiguration.ManageBerkshelf { - return fmt.Errorf("Unnexpected ManageBerkshelf: %s", *opsstack.ChefConfiguration.ManageBerkshelf) + return fmt.Errorf("Unnexpected ManageBerkshelf: %t", *opsstack.ChefConfiguration.ManageBerkshelf) } if *opsstack.CustomCookbooksSource.Type != "git" { diff --git a/builtin/providers/aws/resource_aws_opsworks_user_profile_test.go b/builtin/providers/aws/resource_aws_opsworks_user_profile_test.go index 41ed6190e..1ac53f3a6 100644 --- a/builtin/providers/aws/resource_aws_opsworks_user_profile_test.go +++ b/builtin/providers/aws/resource_aws_opsworks_user_profile_test.go @@ -74,7 +74,7 @@ func testAccCheckAWSOpsworksUserProfileExists( opsuserprofile := *resp.UserProfiles[0] if *opsuserprofile.AllowSelfManagement { - return fmt.Errorf("Unnexpected allowSelfManagement: %s", + return fmt.Errorf("Unnexpected allowSelfManagement: %t", *opsuserprofile.AllowSelfManagement) } diff --git a/builtin/providers/ignition/resource_ignition_filesystem_test.go b/builtin/providers/ignition/resource_ignition_filesystem_test.go index fe8d53f6d..d8e7aca04 100644 --- a/builtin/providers/ignition/resource_ignition_filesystem_test.go +++ b/builtin/providers/ignition/resource_ignition_filesystem_test.go @@ -71,7 +71,7 @@ func TestIngnitionFilesystem(t *testing.T) { } if f.Mount.Create != nil { - return fmt.Errorf("mount, create was found %q", f.Mount.Create) + return fmt.Errorf("mount, create was found %#v", f.Mount.Create) } f = c.Storage.Filesystems[2] @@ -88,7 +88,7 @@ func TestIngnitionFilesystem(t *testing.T) { } if f.Mount.Create.Force != true { - return fmt.Errorf("mount.0.force, found %q", f.Mount.Create.Force) + return fmt.Errorf("mount.0.force, found %t", f.Mount.Create.Force) } if len(f.Mount.Create.Options) != 1 || f.Mount.Create.Options[0] != "rw" { diff --git a/builtin/providers/ignition/resource_ignition_raid_test.go b/builtin/providers/ignition/resource_ignition_raid_test.go index bb0fdbb67..46e74e5e8 100644 --- a/builtin/providers/ignition/resource_ignition_raid_test.go +++ b/builtin/providers/ignition/resource_ignition_raid_test.go @@ -32,7 +32,7 @@ func TestIngnitionRaid(t *testing.T) { } if len(a.Devices) != 1 || a.Devices[0] != "/foo" { - return fmt.Errorf("devices, found %d", a.Devices) + return fmt.Errorf("devices, found %v", a.Devices) } if a.Level != "raid10" { diff --git a/builtin/providers/ignition/resource_ignition_systemd_unit_test.go b/builtin/providers/ignition/resource_ignition_systemd_unit_test.go index 4b8f8f841..8375b0ab8 100644 --- a/builtin/providers/ignition/resource_ignition_systemd_unit_test.go +++ b/builtin/providers/ignition/resource_ignition_systemd_unit_test.go @@ -42,11 +42,11 @@ func TestIngnitionSystemdUnit(t *testing.T) { } if u.Mask != true { - return fmt.Errorf("mask, found %q", u.Mask) + return fmt.Errorf("mask, found %t", u.Mask) } if u.Enable != false { - return fmt.Errorf("enable, found %q", u.Enable) + return fmt.Errorf("enable, found %t", u.Enable) } if len(u.DropIns) != 1 { diff --git a/builtin/providers/ignition/resource_ignition_user_test.go b/builtin/providers/ignition/resource_ignition_user_test.go index e31427aae..d19f1f036 100644 --- a/builtin/providers/ignition/resource_ignition_user_test.go +++ b/builtin/providers/ignition/resource_ignition_user_test.go @@ -66,7 +66,7 @@ func TestIngnitionUser(t *testing.T) { } if u.Create.NoCreateHome != true { - return fmt.Errorf("no_create_home, found %q", u.Create.NoCreateHome) + return fmt.Errorf("no_create_home, found %t", u.Create.NoCreateHome) } if u.Create.PrimaryGroup != "primary_group" { @@ -78,11 +78,11 @@ func TestIngnitionUser(t *testing.T) { } if u.Create.NoUserGroup != true { - return fmt.Errorf("no_create_home, found %q", u.Create.NoCreateHome) + return fmt.Errorf("no_create_home, found %t", u.Create.NoCreateHome) } if u.Create.NoLogInit != true { - return fmt.Errorf("no_log_init, found %q", u.Create.NoLogInit) + return fmt.Errorf("no_log_init, found %t", u.Create.NoLogInit) } if u.Create.Shell != "shell" {