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

Unified Diff: cmd/juju/upgradejuju_test.go

Issue 69890053: juju upgrade-juju - major version upgrades (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cmd/juju/upgradejuju.go ('K') | « cmd/juju/upgradejuju.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmd/juju/upgradejuju_test.go
=== modified file 'cmd/juju/upgradejuju_test.go'
--- cmd/juju/upgradejuju_test.go 2013-12-06 04:47:45 +0000
+++ cmd/juju/upgradejuju_test.go 2014-03-05 04:46:25 +0000
@@ -90,7 +90,7 @@
}, {
about: "--upload-tools with inappropriate version 2",
currentVersion: "3.2.7-quantal-amd64",
- args: []string{"--upload-tools", "--version", "3.1.0.4"},
+ args: []string{"--upload-tools", "--version", "3.2.8.4"},
expectInitErr: "cannot specify build number when uploading tools",
}, {
about: "latest supported stable release",
@@ -105,6 +105,24 @@
agentVersion: "2.0.0",
expectVersion: "2.0.5",
}, {
+ about: "latest current release matching CLI, major version",
+ tools: []string{"3.2.0-quantal-amd64"},
+ currentVersion: "3.2.0-quantal-amd64",
+ agentVersion: "2.8.2",
+ expectVersion: "3.2.0",
+}, {
+ about: "latest current release matching CLI, major version, no matching major tools",
+ tools: []string{"2.8.2-quantal-amd64"},
+ currentVersion: "3.2.0-quantal-amd64",
+ agentVersion: "2.8.2",
+ expectErr: "no matching tools available",
+}, {
+ about: "latest current release matching CLI, major version, no matching tools",
+ tools: []string{"3.3.0-quantal-amd64"},
+ currentVersion: "3.2.0-quantal-amd64",
+ agentVersion: "2.8.2",
+ expectErr: "no compatible tools available",
+}, {
about: "no next supported available",
tools: []string{"2.1.0-quantal-amd64", "2.1.5-quantal-i386", "2.3.3-quantal-amd64"},
currentVersion: "2.0.0-quantal-amd64",
@@ -130,6 +148,13 @@
args: []string{"--version", "2.3.0"},
expectVersion: "2.3.0",
}, {
+ about: "specified major version",
+ tools: []string{"3.2.0-quantal-amd64"},
+ currentVersion: "3.2.0-quantal-amd64",
+ agentVersion: "2.8.2",
+ args: []string{"--version", "3.2.0"},
+ expectVersion: "3.2.0",
+}, {
about: "specified version missing, but already set",
currentVersion: "3.0.0-quantal-amd64",
agentVersion: "3.0.0",
@@ -175,14 +200,14 @@
currentVersion: "3.2.0-quantal-amd64",
agentVersion: "4.2.0",
args: []string{"--version", "3.2.0"},
- expectErr: "cannot change major version from 4 to 3",
+ expectErr: "cannot change version from 4.2 to 3.2",
}, {
- about: "major version upgrade to compatible version",
+ about: "minor version downgrade to incompatible version",
tools: []string{"3.2.0-quantal-amd64"},
currentVersion: "3.2.0-quantal-amd64",
- agentVersion: "2.8.2",
+ agentVersion: "3.3.0",
args: []string{"--version", "3.2.0"},
- expectErr: "major version upgrades are not supported yet",
+ expectErr: "cannot change version from 3.3 to 3.2",
}, {
about: "nothing available",
currentVersion: "2.0.0-quantal-amd64",
« cmd/juju/upgradejuju.go ('K') | « cmd/juju/upgradejuju.go ('k') | no next file » | no next file with comments »

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