~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/environs/manual/init_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        defer installFakeSSH(c, manual.DetectionScript, []string{scriptResponse, "non-empty-stderr"}, 0)()
50
50
        hc, _, err = manual.DetectSeriesAndHardwareCharacteristics("hostname")
51
51
        c.Assert(err, jc.ErrorIsNil)
52
 
        c.Assert(hc.String(), gc.Equals, "arch=armhf cpu-cores=1 mem=4M")
 
52
        c.Assert(hc.String(), gc.Equals, "arch=armhf cores=1 mem=4M")
53
53
}
54
54
 
55
55
func (s *initialisationSuite) TestDetectHardwareCharacteristics(c *gc.C) {
60
60
        }{{
61
61
                "Single CPU socket, single core, no hyper-threading",
62
62
                []string{"edgy", "armv4", "MemTotal: 4096 kB", "processor: 0"},
63
 
                "arch=armhf cpu-cores=1 mem=4M",
 
63
                "arch=armhf cores=1 mem=4M",
64
64
        }, {
65
65
                "Single CPU socket, single core, hyper-threading",
66
66
                []string{
72
72
                        "physical id: 0",
73
73
                        "cpu cores: 1",
74
74
                },
75
 
                "arch=armhf cpu-cores=1 mem=4M",
 
75
                "arch=armhf cores=1 mem=4M",
76
76
        }, {
77
77
                "Single CPU socket, dual-core, no hyper-threading",
78
78
                []string{
84
84
                        "physical id: 0",
85
85
                        "cpu cores: 2",
86
86
                },
87
 
                "arch=armhf cpu-cores=2 mem=4M",
 
87
                "arch=armhf cores=2 mem=4M",
88
88
        }, {
89
89
                "Dual CPU socket, each single-core, hyper-threading",
90
90
                []string{
102
102
                        "physical id: 1",
103
103
                        "cpu cores: 1",
104
104
                },
105
 
                "arch=armhf cpu-cores=2 mem=4M",
 
105
                "arch=armhf cores=2 mem=4M",
106
106
        }}
107
107
        for i, test := range tests {
108
108
                c.Logf("test %d: %s", i, test.summary)