Migrates session tests in integration-cli to api tests Upstream-commit: 945b786c140b037822c3f1792c3a05a1c16c9a4b Component: engine