* Fixing the make error or invalid data type for errorf and printf * fix make errors
This commit is contained in:
parent
37557f9452
commit
a9aaf44a87
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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{}
|
||||
|
@ -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{}
|
||||
|
@ -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),
|
||||
|
|
|
@ -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 {
|
||||
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue