Skip to content

Commit

Permalink
fix make issues (supersedes #7868) (#7876)
Browse files Browse the repository at this point in the history
* Fixing the make error or invalid data type for errorf and printf

* fix make errors
  • Loading branch information
catsby authored and stack72 committed Jul 29, 2016
1 parent 37557f9 commit a9aaf44
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource {
// https://github.com/boto/botocore/blob/9f322b1/botocore/data/autoscaling/2011-01-01/service-2.json#L1862-L1873
value := v.(string)
if len(value) > 255 {
errors = append(errors, fmt.Errorf("q cannot be longer than 255 characters", k))
errors = append(errors, fmt.Errorf("%s cannot be longer than 255 characters", k))
}
return
},
Expand Down
10 changes: 5 additions & 5 deletions builtin/providers/aws/structure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func TestExpandParameters(t *testing.T) {
}
}

func TestexpandRedshiftParameters(t *testing.T) {
func TestExpandRedshiftParameters(t *testing.T) {
expanded := []interface{}{
map[string]interface{}{
"name": "character_set_client",
Expand All @@ -502,7 +502,7 @@ func TestexpandRedshiftParameters(t *testing.T) {
}
}

func TestexpandElasticacheParameters(t *testing.T) {
func TestExpandElasticacheParameters(t *testing.T) {
expanded := []interface{}{
map[string]interface{}{
"name": "activerehashing",
Expand Down Expand Up @@ -584,7 +584,7 @@ func TestFlattenParameters(t *testing.T) {
}
}

func TestflattenRedshiftParameters(t *testing.T) {
func TestFlattenRedshiftParameters(t *testing.T) {
cases := []struct {
Input []*redshift.Parameter
Output []map[string]interface{}
Expand Down Expand Up @@ -613,7 +613,7 @@ func TestflattenRedshiftParameters(t *testing.T) {
}
}

func TestflattenElasticacheParameters(t *testing.T) {
func TestFlattenElasticacheParameters(t *testing.T) {
cases := []struct {
Input []*elasticache.Parameter
Output []map[string]interface{}
Expand Down Expand Up @@ -774,7 +774,7 @@ func TestFlattenAttachmentWhenNoInstanceId(t *testing.T) {
}
}

func TestflattenStepAdjustments(t *testing.T) {
func TestFlattenStepAdjustments(t *testing.T) {
expanded := []*autoscaling.StepAdjustment{
&autoscaling.StepAdjustment{
MetricIntervalLowerBound: aws.Float64(1.0),
Expand Down
4 changes: 2 additions & 2 deletions builtin/providers/template/datasource_template_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestValidateVarsAttribute(t *testing.T) {
func TestTemplateSharedMemoryRace(t *testing.T) {
var wg sync.WaitGroup
for i := 0; i < 100; i++ {
go func(wg sync.WaitGroup, t *testing.T, i int) {
go func(wg *sync.WaitGroup, t *testing.T, i int) {
wg.Add(1)
out, err := execute("don't panic!", map[string]interface{}{})
if err != nil {
Expand All @@ -132,7 +132,7 @@ func TestTemplateSharedMemoryRace(t *testing.T) {
t.Fatalf("bad output: %s", out)
}
wg.Done()
}(wg, t, i)
}(&wg, t, i)
}
wg.Wait()
}
Expand Down
4 changes: 2 additions & 2 deletions plugin/resource_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ func TestResourceProvider_datasources(t *testing.T) {
provider := raw.(terraform.ResourceProvider)

expected := []terraform.DataSource{
{"foo"},
{"bar"},
{Name: "foo"},
{Name: "bar"},
}

p.DataSourcesReturn = expected
Expand Down
2 changes: 1 addition & 1 deletion terraform/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,6 @@ func parseVariableAsHCL(name string, input interface{}, targetType config.Variab

return nil, fmt.Errorf("Cannot parse value for variable %s (%q) as valid HCL. One value must be specified.", name, input)
default:
panic(fmt.Errorf("unknown type %s", targetType))
panic(fmt.Errorf("unknown type %s", targetType.Printable()))
}
}

0 comments on commit a9aaf44

Please sign in to comment.