Closed ajoaoff closed 3 years ago
Original issue opened by @ArturoQuintana at https://github.com/kytos/maintenance/issues/35.
@hdiogenes @ajoaoff @rmotitsuki
It has been tested the API call /maintenance/{mw_id}/end on PATCH with the idea to execute an early end over a maintenance task that is running. Unfortunately, this task does not succeed. The test code used is as follow:
def test_040_end_mw_on_switch(self): # Setup maintenance window data start = datetime.now() + timedelta(seconds=60) end = start + timedelta(hours=1) payload = { "description": "mw for test 040", "start": start.strftime(TIME_FMT), "end": end.strftime(TIME_FMT), "items": [ "00:00:00:00:00:00:00:02" ] } # Request maintenance schema creation, and extract the mw_id json_data = self.request_maintenance(payload, False) mw_id = json_data["mw_id"] time.sleep(10) api_url = KYTOS_API + '/maintenance/' + mw_id + '/end' request = requests.patch(api_url) assert request.status_code == 201`
Closed by #24
Original issue opened by @ArturoQuintana at https://github.com/kytos/maintenance/issues/35.
@hdiogenes @ajoaoff @rmotitsuki
It has been tested the API call /maintenance/{mw_id}/end on PATCH with the idea to execute an early end over a maintenance task that is running. Unfortunately, this task does not succeed. The test code used is as follow: