~jamesodhunt/snappy/log-commands-that-change-system-state

« back to all changes in this revision

Viewing changes to snappy/sort_test.go

  • Committer: Snappy Tarmac
  • Author(s): Michael Vogt
  • Date: 2015-03-25 20:32:06 UTC
  • mfrom: (241.3.9 snappy-rollback)
  • Revision ID: snappy_tarmac-20150325203206-qykwtfysh3i1vl4i
Add the rollback command for snappy. by mvo approved by sergiusens

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
        sort.Sort(ByVersion(versions))
60
60
        c.Assert(versions, DeepEquals, []string{"1.0", "1.2", "1.2.2", "2.0"})
61
61
}
 
62
 
 
63
func (s *SortTestSuite) TestSortSnaps(c *C) {
 
64
        snaps := []Part{
 
65
                &RemoteSnapPart{pkg: remoteSnap{Version: "2.0"}},
 
66
                &RemoteSnapPart{pkg: remoteSnap{Version: "1.0"}},
 
67
        }
 
68
        sort.Sort(BySnapVersion(snaps))
 
69
        c.Assert(snaps[0].Version(), Equals, "1.0")
 
70
        c.Assert(snaps[1].Version(), Equals, "2.0")
 
71
}