mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
helper/resource: improve logging and output for tests
This commit is contained in:
parent
8d065ce5c4
commit
91ad873113
@ -62,6 +62,12 @@ func (m *Map) Apply(
|
||||
if s.ID == "" {
|
||||
result, err = r.Create(s, d, meta)
|
||||
} else {
|
||||
if r.Update == nil {
|
||||
return s, fmt.Errorf(
|
||||
"Resource type '%s' doesn't support update",
|
||||
s.Type)
|
||||
}
|
||||
|
||||
result, err = r.Update(s, d, meta)
|
||||
}
|
||||
if result != nil {
|
||||
|
@ -202,9 +202,11 @@ func testStep(
|
||||
}
|
||||
|
||||
// Plan!
|
||||
if _, err := ctx.Plan(&terraform.PlanOpts{Destroy: step.Destroy}); err != nil {
|
||||
if p, err := ctx.Plan(&terraform.PlanOpts{Destroy: step.Destroy}); err != nil {
|
||||
return state, fmt.Errorf(
|
||||
"Error planning: %s", err)
|
||||
} else {
|
||||
log.Printf("[WARN] Test: Step plan: %s", p)
|
||||
}
|
||||
|
||||
// Apply!
|
||||
|
Loading…
Reference in New Issue
Block a user