mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
core: return explicit caption if tests fail to construct context
The previous error was very generic, making it hard to quickly tell from the test output that the error was during context initialization.
This commit is contained in:
parent
8bfc6e7b1c
commit
1c0b715999
@ -151,7 +151,7 @@ func testContext2(t *testing.T, opts *ContextOpts) *Context {
|
||||
|
||||
ctx, err := NewContext(opts)
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
t.Fatalf("failed to create test context\n\n%s\n", err)
|
||||
}
|
||||
|
||||
return ctx
|
||||
|
Loading…
Reference in New Issue
Block a user