iilyak opened a new pull request #1543: Add `POST /_node/$node/_restart` endpoint URL: https://github.com/apache/couchdb/pull/1543 ## Overview We need to be able to restart CouchDB from integration test suite. We used to have this feature, but it was removed. This PR brings this functionality back under `/_node/$node/_restart`. ## Testing recommendations 1. compile and start CouchDB using `dev/run` ``` make && dev/run --admin=adm:pass ``` 2. try to access new endpoint as non authenticated user (you shouldn't be able to) ``` curl -s -X POST 127.0.0.1:35984/_node/[email protected]/_restart ``` 3. note number of ets tables on the node ``` curl -s -u adm:pass -X GET 127.0.0.1:35984/_node/[email protected]/_system | jq '.ets_table_count' ``` 4. trigger restart of the node (the call should succeed) ``` curl -s -u adm:pass -X POST 127.0.0.1:35984/_node/[email protected]/_restart ``` 5. keep checking the number of ets tables on the node. The call should return `null` few times and then it should increase gradually. ``` curl -s -u adm:pass -X GET 127.0.0.1:35984/_node/[email protected]/_system | jq '.ets_table_count' ``` ## Related Issues or Pull Requests ## Checklist - [x] Code is written and works correctly; - [ ] Changes are covered by tests; - [ ] Documentation reflects the changes;
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
