Ubuntu Pastebin

Paste from elopio at Fri, 29 May 2015 14:14:49 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package snappy

import (
	"os"
	"os/exec"
	"testing"

	. "launchpad.net/gocheck"
)

// Hook up gocheck into the "go test" runner
func Test(t *testing.T) { TestingT(t) }

var _ = Suite(&InfoSuite{})

type InfoSuite struct{}

func (s *InfoSuite) TestInfo(c *C) {
	framework := os.Getenv("framework")

	cmd := exec.Command("snappy", "info")
	output, err := cmd.Output()
	c.Assert(err, IsNil)

	expected :=
        "^release: ubuntu-core/.*/(edge|stable)\n" +
        ".*\n" +
        "frameworks: " + framework + "\n" +
        ".*\n"
	c.Assert(string(output), Matches, expected)
}
Download as text