Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #67 from puppetlabs/maint/main/status_test_cfg
Browse files Browse the repository at this point in the history
(MAINT) Adjust status accept tests to use siloed cfg
  • Loading branch information
michaeltlombardi authored Dec 13, 2021
2 parents d29ea94 + 46091fe commit 014c9e4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions acceptance/status/status_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package status_test

import (
"fmt"
"path/filepath"
"runtime"
"testing"

Expand All @@ -18,9 +20,10 @@ func Test_PrmStatus_NoArgs(t *testing.T) {

// Setup
testutils.SetAppName(APP)
tempDir := testutils.GetTmpDir(t)

// Exec
stdout, stderr, exitCode := testutils.RunAppCommand("status", "")
stdout, stderr, exitCode := testutils.RunAppCommand(fmt.Sprintf("status --config %s", filepath.Join(tempDir, ".prm.yaml")), "")

assert.Contains(t, stdout, "Puppet version: 7.0.0")
assert.Contains(t, stdout, "Backend: docker (running)")
Expand All @@ -36,9 +39,10 @@ func Test_PrmStatus_Json(t *testing.T) {

// Setup
testutils.SetAppName(APP)
tempDir := testutils.GetTmpDir(t)

// Exec
stdout, stderr, exitCode := testutils.RunAppCommand("status --format json", "")
stdout, stderr, exitCode := testutils.RunAppCommand(fmt.Sprintf("status --format json --config %s", filepath.Join(tempDir, ".prm.yaml")), "")

assert.Contains(t, stdout, `"PuppetVersion":"7.0.0"`)
assert.Contains(t, stdout, `"Backend":"docker"`)
Expand Down

0 comments on commit 014c9e4

Please sign in to comment.