providers: Mention check number when acctest fails
This commit is contained in:
parent
c23fe545f7
commit
24048b4dca
|
@ -316,9 +316,9 @@ func testStep(
|
||||||
// into smaller pieces more easily.
|
// into smaller pieces more easily.
|
||||||
func ComposeTestCheckFunc(fs ...TestCheckFunc) TestCheckFunc {
|
func ComposeTestCheckFunc(fs ...TestCheckFunc) TestCheckFunc {
|
||||||
return func(s *terraform.State) error {
|
return func(s *terraform.State) error {
|
||||||
for _, f := range fs {
|
for i, f := range fs {
|
||||||
if err := f(s); err != nil {
|
if err := f(s); err != nil {
|
||||||
return err
|
return fmt.Errorf("Check %d/%d error: %s", i+1, len(fs), err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ func TestComposeTestCheckFunc(t *testing.T) {
|
||||||
},
|
},
|
||||||
func(*terraform.State) error { return nil },
|
func(*terraform.State) error { return nil },
|
||||||
},
|
},
|
||||||
Result: "error",
|
Result: "Check 1/2 error: error",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -204,7 +204,7 @@ func TestComposeTestCheckFunc(t *testing.T) {
|
||||||
return fmt.Errorf("error")
|
return fmt.Errorf("error")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Result: "error",
|
Result: "Check 2/2 error: error",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue