mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
Adapt expected response of advanced settings feature control for cloud tests (#70793)
This commit is contained in:
parent
f62f3e3727
commit
4257afad1b
1 changed files with 10 additions and 3 deletions
|
@ -21,9 +21,16 @@ export default function featureControlsTests({ getService }: FtrProviderContext)
|
||||||
};
|
};
|
||||||
|
|
||||||
const expectResponse = (result: any) => {
|
const expectResponse = (result: any) => {
|
||||||
|
if (result.response && result.response.statusCode === 400) {
|
||||||
|
// expect a change of telemetry settings to fail in cloud environment
|
||||||
|
expect(result.response.body.message).to.be(
|
||||||
|
'{"error":"Not allowed to change Opt-in Status."}'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
expect(result.error).to.be(undefined);
|
expect(result.error).to.be(undefined);
|
||||||
expect(result.response).not.to.be(undefined);
|
expect(result.response).not.to.be(undefined);
|
||||||
expect(result.response).to.have.property('statusCode', 200);
|
expect(result.response).to.have.property('statusCode', 200);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
async function saveAdvancedSetting(username: string, password: string, spaceId?: string) {
|
async function saveAdvancedSetting(username: string, password: string, spaceId?: string) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue