@@ -1833,6 +1833,7 @@ func TestClusterTopologyValidation(t *testing.T) {
1833
1833
name : "should update" ,
1834
1834
expectErr : false ,
1835
1835
old : builder .Cluster ("fooboo" , "cluster1" ).
1836
+ WithControlPlane (builder .ControlPlane ("fooboo" , "cluster1-cp" ).Build ()).
1836
1837
WithTopology (builder .ClusterTopology ().
1837
1838
WithClass ("foo" ).
1838
1839
WithVersion ("v1.19.1" ).
@@ -1855,6 +1856,7 @@ func TestClusterTopologyValidation(t *testing.T) {
1855
1856
Build ()).
1856
1857
Build (),
1857
1858
in : builder .Cluster ("fooboo" , "cluster1" ).
1859
+ WithControlPlane (builder .ControlPlane ("fooboo" , "cluster1-cp" ).Build ()).
1858
1860
WithTopology (builder .ClusterTopology ().
1859
1861
WithClass ("foo" ).
1860
1862
WithVersion ("v1.19.2" ).
@@ -1876,6 +1878,21 @@ func TestClusterTopologyValidation(t *testing.T) {
1876
1878
Build ()).
1877
1879
Build ()).
1878
1880
Build (),
1881
+ additionalObjects : []client.Object {
1882
+ builder .ControlPlane ("fooboo" , "cluster1-cp" ).WithVersion ("v1.19.1" ).
1883
+ WithStatusFields (map [string ]interface {}{"status.version" : "v1.19.1" }).
1884
+ Build (),
1885
+ builder .MachineDeployment ("fooboo" , "cluster1-workers1" ).WithLabels (map [string ]string {
1886
+ clusterv1 .ClusterNameLabel : "cluster1" ,
1887
+ clusterv1 .ClusterTopologyOwnedLabel : "" ,
1888
+ clusterv1 .ClusterTopologyMachineDeploymentNameLabel : "workers1" ,
1889
+ }).WithVersion ("v1.19.1" ).Build (),
1890
+ builder .MachinePool ("fooboo" , "cluster1-pool1" ).WithLabels (map [string ]string {
1891
+ clusterv1 .ClusterNameLabel : "cluster1" ,
1892
+ clusterv1 .ClusterTopologyOwnedLabel : "" ,
1893
+ clusterv1 .ClusterTopologyMachinePoolNameLabel : "pool1" ,
1894
+ }).WithVersion ("v1.19.1" ).Build (),
1895
+ },
1879
1896
},
1880
1897
{
1881
1898
name : "should return error when upgrade concurrency annotation value is < 1" ,
0 commit comments