# Test that we are able to generate valid test plans with multiple
# upgrades.

mixed-version-test predecessors=(22.1.8, 22.2.3, 23.1.4) num_upgrades=3
----
ok

in-mixed-version name=(mixed-version 1)
----
ok

workload name=bank
----
ok

plan
----
Seed:               12345
Upgrades:           v22.1.8 → v22.2.3 → v23.1.4 → <current>
Deployment mode:    system-only
Plan:
├── install fixtures for version "v22.1.8" (1)
├── start cluster at version "v22.1.8" (2)
├── wait for all nodes (:1-4) to acknowledge cluster version '22.1' on system tenant (3)
├── upgrade cluster from "v22.1.8" to "v22.2.3"
│   ├── prevent auto-upgrades on system tenant by setting `preserve_downgrade_option` (4)
│   ├── upgrade nodes :1-4 from "v22.1.8" to "v22.2.3"
│   │   ├── restart node 4 with binary version v22.2.3 (5)
│   │   ├── restart node 1 with binary version v22.2.3 (6)
│   │   ├── wait for 5m0s (7)
│   │   ├── restart node 2 with binary version v22.2.3 (8)
│   │   └── restart node 3 with binary version v22.2.3 (9)
│   ├── allow upgrade to happen on system tenant by resetting `preserve_downgrade_option` (10)
│   └── wait for all nodes (:1-4) to acknowledge cluster version '22.2' on system tenant (11)
├── run "initialize bank workload" (12)
├── run "bank workload" (13)
├── upgrade cluster from "v22.2.3" to "v23.1.4"
│   ├── prevent auto-upgrades on system tenant by setting `preserve_downgrade_option` (14)
│   ├── upgrade nodes :1-4 from "v22.2.3" to "v23.1.4"
│   │   ├── restart node 3 with binary version v23.1.4 (15)
│   │   ├── restart node 1 with binary version v23.1.4 (16)
│   │   ├── restart node 4 with binary version v23.1.4 (17)
│   │   ├── run "mixed-version 1" (18)
│   │   └── restart node 2 with binary version v23.1.4 (19)
│   ├── downgrade nodes :1-4 from "v23.1.4" to "v22.2.3"
│   │   ├── restart node 1 with binary version v22.2.3 (20)
│   │   ├── run "mixed-version 1" (21)
│   │   ├── restart node 3 with binary version v22.2.3 (22)
│   │   ├── restart node 4 with binary version v22.2.3 (23)
│   │   └── restart node 2 with binary version v22.2.3 (24)
│   ├── upgrade nodes :1-4 from "v22.2.3" to "v23.1.4"
│   │   ├── restart node 3 with binary version v23.1.4 (25)
│   │   ├── run "mixed-version 1" (26)
│   │   ├── restart node 4 with binary version v23.1.4 (27)
│   │   ├── restart node 2 with binary version v23.1.4 (28)
│   │   └── restart node 1 with binary version v23.1.4 (29)
│   ├── allow upgrade to happen on system tenant by resetting `preserve_downgrade_option` (30)
│   ├── run "mixed-version 1" (31)
│   └── wait for all nodes (:1-4) to acknowledge cluster version '23.1' on system tenant (32)
└── upgrade cluster from "v23.1.4" to "<current>"
   ├── prevent auto-upgrades on system tenant by setting `preserve_downgrade_option` (33)
   ├── upgrade nodes :1-4 from "v23.1.4" to "<current>"
   │   ├── restart node 3 with binary version <current> (34)
   │   ├── run "mixed-version 1" (35)
   │   ├── restart node 2 with binary version <current> (36)
   │   ├── restart node 1 with binary version <current> (37)
   │   └── restart node 4 with binary version <current> (38)
   ├── downgrade nodes :1-4 from "<current>" to "v23.1.4"
   │   ├── restart node 2 with binary version v23.1.4 (39)
   │   ├── restart node 3 with binary version v23.1.4 (40)
   │   ├── run "mixed-version 1" (41)
   │   ├── restart node 1 with binary version v23.1.4 (42)
   │   └── restart node 4 with binary version v23.1.4 (43)
   ├── upgrade nodes :1-4 from "v23.1.4" to "<current>"
   │   ├── restart node 3 with binary version <current> (44)
   │   ├── restart node 4 with binary version <current> (45)
   │   ├── restart node 2 with binary version <current> (46)
   │   ├── restart node 1 with binary version <current> (47)
   │   └── run "mixed-version 1" (48)
   ├── allow upgrade to happen on system tenant by resetting `preserve_downgrade_option` (49)
   ├── run "mixed-version 1" (50)
   └── wait for all nodes (:1-4) to acknowledge cluster version <current> on system tenant (51)
