MCPcopy
hub / github.com/opentofu/opentofu / TestOutput_noVars

Function TestOutput_noVars

internal/command/output_test.go:263–286  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

261}
262
263func TestOutput_noVars(t *testing.T) {
264 originalState := states.NewState()
265
266 statePath := testStateFile(t, originalState)
267
268 view, done := testView(t)
269 c := &OutputCommand{
270 Meta: Meta{
271 WorkingDir: workdir.NewDir("."),
272 testingOverrides: metaOverridesForProvider(testProvider()),
273 View: view,
274 },
275 }
276
277 args := []string{
278 "-state", statePath,
279 "bar",
280 }
281 code := c.Run(args)
282 output := done(t)
283 if code != 0 {
284 t.Fatalf("bad: \n%s", output.Stderr())
285 }
286}
287
288func TestOutput_stateDefault(t *testing.T) {
289 originalState := states.BuildState(func(s *states.SyncState) {

Callers

nothing calls this directly

Calls 8

RunMethod · 0.95
NewStateFunction · 0.92
NewDirFunction · 0.92
metaOverridesForProviderFunction · 0.85
StderrMethod · 0.80
testStateFileFunction · 0.70
testViewFunction · 0.70
testProviderFunction · 0.70

Tested by

no test coverage detected