~chipaca/snappy/use-etc-writable-for-atomics

« back to all changes in this revision

Viewing changes to cmd/snappy/common_test.go

  • Committer: Snappy Tarmac
  • Author(s): John R. Lenton
  • Date: 2015-10-19 12:43:25 UTC
  • mfrom: (776.1.2 skip-homedir-no-schroot)
  • Revision ID: snappy_tarmac-20151019124325-pw7hkfk4tiqepkm2
* skip the "homedir is still found when HOME is empty" test when the original HOME env indicates you're in a schroot, as the fallback system call will give the wrong (but correct) result.
* silence the logs when testing a panic in cmd, to avoid scaremongering. by chipaca approved by mvo

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
        "testing"
24
24
 
25
25
        "github.com/jessevdk/go-flags"
26
 
 
27
26
        . "gopkg.in/check.v1"
 
27
 
 
28
        "launchpad.net/snappy/logger"
28
29
)
29
30
 
30
31
// Hook up check.v1 into the "go test" runner
66
67
}
67
68
 
68
69
func (s *CmdTestSuite) TestAddOptionDescriptionOrPanicWillPanic(c *C) {
 
70
        // disable logging so log doesn't scare people
 
71
        logger.SetLogger(logger.NullLogger)
 
72
        defer func() { c.Check(logger.SimpleSetup(), IsNil) }()
 
73
 
69
74
        parser := flags.NewParser(&struct{}{}, 0)
70
75
        arg, err := parser.AddCommand("mock", "shortHelp", "longHelp", &struct{}{})
71
76
        c.Assert(err, IsNil)