@@ -833,7 +833,9 @@ def test_config_healthchecks(self, mock_requests):
833833 self .assertIn ('readinessProbe' , resp .data ['healthcheck' ])
834834 self .assertEqual (resp .data ['healthcheck' ], readiness_probe ['healthcheck' ])
835835
836- liveness_probe = {'healthcheck' : {'livenessProbe' : {'httpGet' : {'port' : 5000 }}}}
836+ liveness_probe = {'healthcheck' : {'livenessProbe' :
837+ {'httpGet' : {'port' : 5000 },
838+ 'successThreshold' : 1 }}}
837839 resp = self .client .post (
838840 '/v2/apps/{app_id}/config' .format (** locals ()),
839841 liveness_probe )
@@ -879,6 +881,16 @@ def test_config_healthchecks_validations(self, mock_requests):
879881 )
880882 self .assertEqual (resp .status_code , 400 , response .data )
881883
884+ # set liveness success threshold to a non-1 value
885+ # Don't set one of the mandatory value
886+ resp = self .client .post (
887+ '/v2/apps/{app_id}/config' .format (** locals ()),
888+ {'healthcheck' : {'livenessProbe' :
889+ {'httpGet' : {'path' : '/' , 'port' : 5000 },
890+ 'successThreshold' : 5 }}}
891+ )
892+ self .assertEqual (resp .status_code , 400 , response .data )
893+
882894 def test_config_healthchecks_legacy (self , mock_requests ):
883895 """
884896 Test that when a user uses `deis config:set HEALTHCHECK_URL=/`, the config
0 commit comments