File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ def set_healthchecks(self):
6161 # fetch set health values and any defaults
6262 # this approach allows new health items to be added without issues
6363 health = self .healthcheck ()
64+ if not health :
65+ return
6466
6567 # HTTP GET related
6668 self .values ['HEALTHCHECK_URL' ] = health ['path' ]
Original file line number Diff line number Diff line change @@ -644,6 +644,16 @@ def test_healthchecks(self, mock_requests):
644644 self .assertEqual (response .status_code , 201 )
645645 app_id = response .data ['id' ]
646646
647+ # Set healthcheck URL to get defaults set
648+ body = {'values' : json .dumps ({'HEALTHCHECK_INITIAL_DELAY' : '25' })}
649+ resp = self .client .post (
650+ '/v2/apps/{app_id}/config' .format (** locals ()),
651+ body
652+ )
653+ self .assertEqual (resp .status_code , 201 )
654+ self .assertIn ('HEALTHCHECK_INITIAL_DELAY' , resp .data ['values' ])
655+ self .assertEqual (resp .data ['values' ]['HEALTHCHECK_INITIAL_DELAY' ], '25' )
656+
647657 # Set healthcheck URL to get defaults set
648658 body = {'values' : json .dumps ({'HEALTHCHECK_URL' : '/health' })}
649659 resp = self .client .post (
You can’t perform that action at this time.
0 commit comments