forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsteps_24_test.go
56 lines (45 loc) · 2.01 KB
/
steps_24_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2017 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package upgrades_test
import (
jc "github.com/juju/testing/checkers"
"github.com/juju/version/v2"
gc "gopkg.in/check.v1"
"github.com/juju/juju/testing"
"github.com/juju/juju/upgrades"
)
var v24 = version.MustParse("2.4.0")
type steps24Suite struct {
testing.BaseSuite
}
var _ = gc.Suite(&steps24Suite{})
func (s *steps24Suite) TestMoveOldAuditLog(c *gc.C) {
step := findStateStep(c, v24, "move or drop the old audit log collection")
// Logic for step itself is tested in state package.
c.Assert(step.Targets(), jc.DeepEquals, []upgrades.Target{upgrades.DatabaseMaster})
}
func (s *steps24Suite) TestCopyMongoSpaceToHASpaceConfig(c *gc.C) {
step := findStateStep(c, v24, "move controller info Mongo space to controller config HA space if valid")
// Logic for step itself is tested in state package.
c.Assert(step.Targets(), jc.DeepEquals, []upgrades.Target{upgrades.DatabaseMaster})
}
func (s *steps24Suite) TestCreateMissingApplicationConfig(c *gc.C) {
step := findStateStep(c, v24, "create empty application settings for all applications")
// Logic for step itself is tested in state package.
c.Assert(step.Targets(), jc.DeepEquals, []upgrades.Target{upgrades.DatabaseMaster})
}
func (s *steps24Suite) TestRemoveVotingMachineIds(c *gc.C) {
step := findStateStep(c, v24, "remove votingmachineids")
// Logic for step itself is tested in state package.
c.Assert(step.Targets(), jc.DeepEquals, []upgrades.Target{upgrades.DatabaseMaster})
}
func (s *steps24Suite) TestCloudModelCounts(c *gc.C) {
step := findStateStep(c, v24, "add cloud model counts")
// Logic for step itself is tested in state package.
c.Assert(step.Targets(), jc.DeepEquals, []upgrades.Target{upgrades.DatabaseMaster})
}
func (s *steps24Suite) TestBootstrapRaft(c *gc.C) {
step := findStateStep(c, v24, "bootstrap raft cluster")
// Logic for step itself is tested in raft_test.go.
c.Assert(step.Targets(), jc.DeepEquals, []upgrades.Target{upgrades.Controller})
}