Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Delta Between Two Patch Sets: state/api/upgrader/upgrader_test.go

Issue 13380043: upgrader: add Upgrader.DesiredVersion
Left Patch Set: upgrader: add Upgrader.DesiredVersion Created 11 years, 7 months ago
Right Patch Set: upgrader: add Upgrader.DesiredVersion Created 11 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
(Both sides are equal)
1 // Copyright 2012, 2013 Canonical Ltd. 1 // Copyright 2012, 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package upgrader_test 4 package upgrader_test
5 5
6 import ( 6 import (
7 stdtesting "testing" 7 stdtesting "testing"
8 8
9 gc "launchpad.net/gocheck" 9 gc "launchpad.net/gocheck"
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 cur := version.Current 147 cur := version.Current
148 curTools := &tools.Tools{Version: cur, URL: ""} 148 curTools := &tools.Tools{Version: cur, URL: ""}
149 curTools.Version.Minor++ 149 curTools.Version.Minor++
150 s.rawMachine.SetAgentTools(curTools) 150 s.rawMachine.SetAgentTools(curTools)
151 // Upgrader.DesiredVersion returns the *desired* set of tools, not the 151 // Upgrader.DesiredVersion returns the *desired* set of tools, not the
152 // currently running set. We want to be upgraded to cur.Version 152 // currently running set. We want to be upgraded to cur.Version
153 stateVersion, err := s.st.DesiredVersion(s.rawMachine.Tag()) 153 stateVersion, err := s.st.DesiredVersion(s.rawMachine.Tag())
154 c.Assert(err, gc.IsNil) 154 c.Assert(err, gc.IsNil)
155 c.Assert(stateVersion, gc.Equals, cur.Number) 155 c.Assert(stateVersion, gc.Equals, cur.Number)
156 } 156 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b