github.com/altoros/juju-vmware@v0.0.0-20150312064031-f19ae857ccca/upgrades/steps122_test.go (about)

     1  // Copyright 2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package upgrades_test
     5  
     6  import (
     7  	gc "gopkg.in/check.v1"
     8  
     9  	"github.com/juju/juju/testing"
    10  	"github.com/juju/juju/version"
    11  )
    12  
    13  type steps122Suite struct {
    14  	testing.BaseSuite
    15  }
    16  
    17  var _ = gc.Suite(&steps122Suite{})
    18  
    19  func (s *steps122Suite) TestStateStepsFor122(c *gc.C) {
    20  	expected := []string{
    21  		// Environment UUID related migrations should come first as
    22  		// other upgrade steps may rely on them.
    23  		"prepend the environment UUID to the ID of all settings docs",
    24  		"prepend the environment UUID to the ID of all settingsRefs docs",
    25  		"prepend the environment UUID to the ID of all networks docs",
    26  		"prepend the environment UUID to the ID of all requestedNetworks docs",
    27  		"prepend the environment UUID to the ID of all networkInterfaces docs",
    28  		"prepend the environment UUID to the ID of all statuses docs",
    29  		"prepend the environment UUID to the ID of all annotations docs",
    30  		"prepend the environment UUID to the ID of all constraints docs",
    31  		"prepend the environment UUID to the ID of all meterStatus docs",
    32  		"prepend the environment UUID to the ID of all openPorts docs",
    33  		"fix environment UUID for minUnits docs",
    34  		"fix sequence documents",
    35  		"update system identity in state",
    36  		"set AvailZone in instanceData",
    37  	}
    38  	assertStateSteps(c, version.MustParse("1.22.0"), expected)
    39  }
    40  
    41  func (s *steps122Suite) TestStepsFor122(c *gc.C) {
    42  	expected := []string{
    43  		"update the authorized keys for the system identity",
    44  	}
    45  	assertSteps(c, version.MustParse("1.22.0"), expected)
    46  }