@@ -856,26 +856,6 @@ func TestAccKubernetesDeployment_with_share_process_namespace(t *testing.T) {
856856 })
857857}
858858
859- func TestAccKubernetesDeployment_no_rollout_wait (t * testing.T ) {
860- deploymentName := fmt .Sprintf ("tf-acc-test-%s" , acctest .RandStringFromCharSet (10 , acctest .CharSetAlphaNum ))
861- imageName := nginxImageVersion
862-
863- resource .Test (t , resource.TestCase {
864- PreCheck : func () { testAccPreCheck (t ) },
865- ProviderFactories : testAccProviderFactories ,
866- CheckDestroy : testAccCheckKubernetesDeploymentDestroy ,
867- Steps : []resource.TestStep {
868- {
869- Config : testAccKubernetesDeploymentConfigWithWaitForRolloutFalse (deploymentName , imageName ),
870- Check : resource .ComposeAggregateTestCheckFunc (
871- testAccCheckKubernetesDeploymentRollingOut ("kubernetes_deployment.test" ),
872- resource .TestCheckResourceAttr ("kubernetes_deployment.test" , "wait_for_rollout" , "false" ),
873- ),
874- },
875- },
876- })
877- }
878-
879859func TestAccKubernetesDeployment_with_deployment_strategy_rollingupdate_max_surge_30perc_max_unavailable_40perc (t * testing.T ) {
880860 var conf appsv1.Deployment
881861
@@ -1212,21 +1192,6 @@ func testAccCheckKubernetesDeploymentExists(n string, obj *appsv1.Deployment) re
12121192 }
12131193}
12141194
1215- func testAccCheckKubernetesDeploymentRollingOut (n string ) resource.TestCheckFunc {
1216- return func (s * terraform.State ) error {
1217- d , err := getDeploymentFromResourceName (s , n )
1218- if err != nil {
1219- return err
1220- }
1221-
1222- if d .Status .Replicas == d .Status .ReadyReplicas {
1223- return fmt .Errorf ("deployment has already rolled out" )
1224- }
1225-
1226- return nil
1227- }
1228- }
1229-
12301195func testAccKubernetesDeploymentConfig_minimal (name , imageName string ) string {
12311196 return fmt .Sprintf (`resource "kubernetes_deployment" "test" {
12321197 metadata {
@@ -2642,48 +2607,6 @@ func testAccKubernetesDeploymentConfigWithAutomountServiceAccountToken(deploymen
26422607` , deploymentName , imageName )
26432608}
26442609
2645- func testAccKubernetesDeploymentConfigWithWaitForRolloutFalse (deploymentName , imageName string ) string {
2646- return fmt .Sprintf (`resource "kubernetes_deployment" "test" {
2647- metadata {
2648- name = %q
2649- }
2650- spec {
2651- replicas = 5
2652- selector {
2653- match_labels = {
2654- "app" = "test"
2655- }
2656- }
2657- template {
2658- metadata {
2659- name = "test-automount"
2660- labels = {
2661- "app" = "test"
2662- }
2663- }
2664- spec {
2665- container {
2666- name = "nginx"
2667- image = %q
2668- port {
2669- container_port = 80
2670- }
2671- readiness_probe {
2672- initial_delay_seconds = 5
2673- http_get {
2674- path = "/"
2675- port = 80
2676- }
2677- }
2678- }
2679- }
2680- }
2681- }
2682- wait_for_rollout = false
2683- }
2684- ` , deploymentName , nginxImageVersion )
2685- }
2686-
26872610func testAccKubernetesDeploymentConfigLocal (provider , name , imageName string ) string {
26882611 return fmt .Sprintf (`resource "kubernetes_deployment" "test" {
26892612 provider = %s
0 commit comments