@@ -546,19 +546,11 @@ var _ = Describe("Edit cluster validation should", labels.Feature.Cluster, func(
546
546
SkipNotHosted ()
547
547
}
548
548
549
- By ("Upgrade cluster without --control-plane flag" )
550
- output , err := upgradeService .Upgrade ("-c" , clusterID )
551
- Expect (err ).To (HaveOccurred ())
552
- textData := rosaClient .Parser .TextData .Input (output ).Parse ().Tip ()
553
- Expect (textData ).
554
- To (ContainSubstring (
555
- "ERR: The '--control-plane' option is currently mandatory for Hosted Control Planes" ))
556
-
557
549
By ("Upgrade cluster with invalid cluster id" )
558
550
invalidClusterID := helper .GenerateRandomString (30 )
559
- output , err = upgradeService .Upgrade ("-c" , invalidClusterID )
551
+ output , err : = upgradeService .Upgrade ("-c" , invalidClusterID )
560
552
Expect (err ).To (HaveOccurred ())
561
- textData = rosaClient .Parser .TextData .Input (output ).Parse ().Tip ()
553
+ textData : = rosaClient .Parser .TextData .Input (output ).Parse ().Tip ()
562
554
Expect (textData ).
563
555
To (ContainSubstring (
564
556
"ERR: Failed to get cluster '%s': There is no cluster with identifier or name '%s'" ,
@@ -568,7 +560,6 @@ var _ = Describe("Edit cluster validation should", labels.Feature.Cluster, func(
568
560
By ("Upgrade cluster with incorrect format of the date and time" )
569
561
output , err = upgradeService .Upgrade (
570
562
"-c" , clusterID ,
571
- "--control-plane" ,
572
563
"--mode=auto" ,
573
564
"--schedule-date=\" 2024-06\" " ,
574
565
"--schedule-time=\" 09:00:12\" " ,
@@ -580,7 +571,6 @@ var _ = Describe("Edit cluster validation should", labels.Feature.Cluster, func(
580
571
By ("Upgrade cluster using --schedule, --schedule-date and --schedule-time flags at the same time" )
581
572
output , err = upgradeService .Upgrade (
582
573
"-c" , clusterID ,
583
- "--control-plane" ,
584
574
"--mode=auto" ,
585
575
"--schedule-date=\" 2024-06-24\" " ,
586
576
"--schedule-time=\" 09:00\" " ,
@@ -595,7 +585,6 @@ var _ = Describe("Edit cluster validation should", labels.Feature.Cluster, func(
595
585
By ("Upgrade cluster using --schedule and --version flags at the same time" )
596
586
output , err = upgradeService .Upgrade (
597
587
"-c" , clusterID ,
598
- "--control-plane" ,
599
588
"--mode=auto" ,
600
589
"--schedule=\" 5 5 * * *\" " ,
601
590
"--version=4.15.10" ,
@@ -609,7 +598,6 @@ var _ = Describe("Edit cluster validation should", labels.Feature.Cluster, func(
609
598
By ("Upgrade cluster with value not match the cron epression" )
610
599
output , err = upgradeService .Upgrade (
611
600
"-c" , clusterID ,
612
- "--control-plane" ,
613
601
"--mode=auto" ,
614
602
"--schedule=\" 5 5\" " ,
615
603
"-y" )
@@ -622,7 +610,6 @@ var _ = Describe("Edit cluster validation should", labels.Feature.Cluster, func(
622
610
By ("Upgrade cluster with node_drain_grace_period" )
623
611
output , err = upgradeService .Upgrade (
624
612
"-c" , clusterID ,
625
- "--control-plane" ,
626
613
"--mode=auto" ,
627
614
"--schedule" , "20 20 * * *" ,
628
615
"--node-drain-grace-period" , "60" ,
@@ -3597,6 +3584,10 @@ var _ = Describe("HCP cluster creation supplemental testing",
3597
3584
customProfile .NamePrefix = constants .DefaultNamePrefix
3598
3585
clusterHandler , err = handler .NewTempClusterHandler (rosaClient , customProfile )
3599
3586
Expect (err ).To (BeNil ())
3587
+
3588
+ By ("Init the cluster id and testing cluster name" )
3589
+ clusterID = ""
3590
+ testingClusterName = ""
3600
3591
})
3601
3592
3602
3593
AfterEach (func () {
@@ -3665,52 +3656,54 @@ var _ = Describe("HCP cluster creation supplemental testing",
3665
3656
labels .Critical ,
3666
3657
labels .Runtime .Day1Supplemental ,
3667
3658
func () {
3668
- clusterName : = helper .GenerateRandomName ("ocp-75534" , 2 )
3659
+ testingClusterName = helper .GenerateRandomName ("ocp-75534" , 2 )
3669
3660
flags , err := clusterHandler .GenerateClusterCreateFlags ()
3670
3661
Expect (err ).ToNot (HaveOccurred ())
3671
3662
3672
3663
command := "rosa create cluster --cluster-name " +
3673
- clusterName + " " + strings .Join (flags , " " ) + " " + "--mode auto -y"
3664
+ testingClusterName + " " + strings .Join (flags , " " ) + " " + "--mode auto -y"
3674
3665
rosalCommand := config .GenerateCommand (command )
3675
-
3666
+ fmt . Println ( "debug command is: " , rosalCommand . GetFullCommand ())
3676
3667
stdout , err := rosaClient .Runner .RunCMD (strings .Split (rosalCommand .GetFullCommand (), " " ))
3668
+
3677
3669
Expect (err ).To (BeNil ())
3678
- Expect (stdout .String ()).To (ContainSubstring (fmt .Sprintf ("Cluster '%s' has been created" , clusterName )))
3670
+ Expect (stdout .String ()).To (ContainSubstring (fmt .Sprintf ("Cluster '%s' has been created" , testingClusterName )))
3679
3671
3680
3672
By ("Check the install logs of the hypershift cluster" )
3681
3673
Eventually (func () (string , error ) {
3682
- output , err := clusterService .InstallLog (clusterName )
3674
+ output , err := clusterService .InstallLog (testingClusterName )
3683
3675
return output .String (), err
3684
3676
}, time .Minute * 10 , time .Second * 30 ).Should (And (
3685
- ContainSubstring ("hostedclusters %s Version" , clusterName ),
3686
- ContainSubstring ("hostedclusters %s Release image is valid" , clusterName )))
3677
+ ContainSubstring ("hostedclusters %s Version" , testingClusterName ),
3678
+ ContainSubstring ("hostedclusters %s Release image is valid" , testingClusterName )))
3687
3679
3688
3680
By ("Check the install logs of the hypershift cluster with flag --watch" )
3689
- output , err := clusterService .InstallLog (clusterName , "--watch" )
3681
+ output , err := clusterService .InstallLog (testingClusterName , "--watch" )
3690
3682
Expect (err ).ToNot (HaveOccurred ())
3691
- Expect (output .String ()).Should (ContainSubstring ("hostedclusters %s Version" , clusterName ))
3692
- Expect (output .String ()).Should (ContainSubstring ("hostedclusters %s Release image is valid" , clusterName ))
3693
- Expect (output .String ()).Should (ContainSubstring ("Cluster '%s' is now ready" , clusterName ))
3683
+ Expect (output .String ()).Should (ContainSubstring ("hostedclusters %s Version" , testingClusterName ))
3684
+ Expect (output .String ()).Should (ContainSubstring ("hostedclusters %s Release image is valid" , testingClusterName ))
3685
+ Expect (output .String ()).Should (ContainSubstring ("Cluster '%s' is now ready" , testingClusterName ))
3694
3686
3695
3687
By ("Delete the Hypershift cluster" )
3696
- output , err = clusterService .DeleteCluster (clusterName , "-y" )
3688
+ output , err = clusterService .DeleteCluster (testingClusterName , "-y" )
3697
3689
Expect (err ).ToNot (HaveOccurred ())
3698
- Expect (output .String ()).Should (ContainSubstring ("Cluster '%s' will start uninstalling now" , clusterName ))
3690
+ Expect (output .String ()).Should (ContainSubstring ("Cluster '%s' will start uninstalling now" , testingClusterName ))
3699
3691
3700
3692
By ("Check the uninstall logs of the hypershift cluster" )
3701
3693
Eventually (func () (string , error ) {
3702
- output , err := clusterService .UnInstallLog (clusterName )
3694
+ output , err := clusterService .UnInstallLog (testingClusterName )
3703
3695
return output .String (), err
3704
3696
}, time .Minute * 20 , time .Second * 30 ).
3705
3697
Should (
3706
- ContainSubstring ("hostedclusters %s Reconciliation completed successfully" , clusterName ))
3698
+ ContainSubstring ("hostedclusters %s Reconciliation completed successfully" , testingClusterName ))
3707
3699
3708
3700
By ("Check the uninstall log of the hosted cluster with flag --watch" )
3709
- output , err = clusterService .UnInstallLog (clusterName , "--watch" )
3701
+ output , err = clusterService .UnInstallLog (testingClusterName , "--watch" )
3710
3702
Expect (err ).ToNot (HaveOccurred ())
3711
3703
Expect (output .String ()).Should (ContainSubstring ("hostedclusters %s Reconciliation completed successfully" ,
3712
- clusterName ))
3713
- Expect (output .String ()).Should (ContainSubstring ("Cluster '%s' completed uninstallation" , clusterName ))
3704
+ testingClusterName ))
3705
+ Expect (output .String ()).Should (ContainSubstring ("Cluster '%s' completed uninstallation" , testingClusterName ))
3706
+ testingClusterName = ""
3714
3707
})
3715
3708
3716
3709
It ("Check single AZ hosted cluster can be created - [id:54413]" ,
0 commit comments