2
// diskimage - handles ubuntu disk images
4
// Copyright (c) 2015 Canonical Ltd.
6
// Written by Sergio Schvezov <sergio.schvezov@canonical.com>
10
// This program is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License version 3, as published
12
// by the Free Software Foundation.
14
// This program is distributed in the hope that it will be useful, but
15
// WITHOUT ANY WARRANTY; without even the implied warranties of
16
// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17
// PURPOSE. See the GNU General Public License for more details.
19
// You should have received a copy of the GNU General Public License along
20
// with this program. If not, see <http://www.gnu.org/licenses/>.
25
. "launchpad.net/gocheck"
28
// Hook up gocheck into the "go test" runner.
29
func Test(t *testing.T) { TestingT(t) }
31
type SnappyTestSuite struct{}
33
var _ = Suite(&SnappyTestSuite{})
35
func (s *SnappyTestSuite) TestLegacy(c *C) {
36
c.Check(isLegacy("rolling", "edge", 1), Equals, false)
38
c.Check(isLegacy("15.04", "edge", 1), Equals, true)
39
c.Check(isLegacy("15.04", "edge", 149), Equals, true)
40
c.Check(isLegacy("15.04", "edge", 150), Equals, false)
42
c.Check(isLegacy("15.04", "alpha", 1), Equals, true)
43
c.Check(isLegacy("15.04", "alpha", 9), Equals, true)
44
c.Check(isLegacy("15.04", "alpha", 10), Equals, false)
46
c.Check(isLegacy("15.04", "stable", 1), Equals, true)
47
c.Check(isLegacy("15.04", "stable", 4), Equals, true)
48
c.Check(isLegacy("15.04", "stable", 5), Equals, false)