(t *testing.T)
| 261 | } |
| 262 | |
| 263 | func 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 | |
| 288 | func TestOutput_stateDefault(t *testing.T) { |
| 289 | originalState := states.BuildState(func(s *states.SyncState) { |
nothing calls this directly
no test coverage detected