|
|
|
|
@ -374,8 +374,9 @@ func TestEvalValidateProvisioner_valid(t *testing.T) {
|
|
|
|
|
Config: hcl.EmptyBody(),
|
|
|
|
|
},
|
|
|
|
|
ConnConfig: &configs.Connection{
|
|
|
|
|
//Type: "ssh",
|
|
|
|
|
Config: hcl.EmptyBody(),
|
|
|
|
|
Config: configs.SynthBody("", map[string]cty.Value{
|
|
|
|
|
"host": cty.StringVal("foo"),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -421,6 +422,7 @@ func TestEvalValidateProvisioner_warning(t *testing.T) {
|
|
|
|
|
},
|
|
|
|
|
ConnConfig: &configs.Connection{
|
|
|
|
|
Config: configs.SynthBody("", map[string]cty.Value{
|
|
|
|
|
"host": cty.StringVal("localhost"),
|
|
|
|
|
"type": cty.StringVal("ssh"),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
@ -442,7 +444,7 @@ func TestEvalValidateProvisioner_warning(t *testing.T) {
|
|
|
|
|
var diags tfdiags.Diagnostics
|
|
|
|
|
diags = diags.Append(err)
|
|
|
|
|
if len(diags) != 1 {
|
|
|
|
|
t.Fatalf("wrong number of diagsnostics in %#v; want one warning", diags)
|
|
|
|
|
t.Fatalf("wrong number of diagnostics in %s; want one warning", diags.ErrWithWarnings())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if got, want := diags[0].Description().Summary, mp.ValidateProvisionerConfigResponse.Diagnostics[0].Description().Summary; got != want {
|
|
|
|
|
@ -492,7 +494,7 @@ func TestEvalValidateProvisioner_connectionInvalid(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
var diags tfdiags.Diagnostics
|
|
|
|
|
diags = diags.Append(err)
|
|
|
|
|
if len(diags) != 2 {
|
|
|
|
|
if len(diags) != 3 {
|
|
|
|
|
t.Fatalf("wrong number of diagnostics; want two errors\n\n%s", diags.Err())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|