[Fleet] Change error message for allowAgentUpgradeSourceUri (#124706)

This commit is contained in:
smnschneider 2022-02-07 23:38:58 +01:00 committed by GitHub
parent 912f4b910f
commit 1f0f399d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -133,7 +133,7 @@ export const checkVersionIsSame = (version: string, kibanaVersion: string) => {
const checkSourceUriAllowed = (sourceUri?: string) => {
if (sourceUri && !appContextService.getConfig()?.developer?.allowAgentUpgradeSourceUri) {
throw new Error(
`source_uri is not allowed or recommended in production. Set xpack.fleet.developer.allowAgentUpgradeSourceUri in kibana.yml to enable.`
`source_uri is not allowed or recommended in production. Set xpack.fleet.developer.allowAgentUpgradeSourceUri in kibana.yml to true.`
);
}
};

View file

@ -174,7 +174,7 @@ export default function (providerContext: FtrProviderContext) {
.expect(400);
expect(res.body.message).to.eql(
`source_uri is not allowed or recommended in production. Set xpack.fleet.developer.allowAgentUpgradeSourceUri in kibana.yml to enable.`
`source_uri is not allowed or recommended in production. Set xpack.fleet.developer.allowAgentUpgradeSourceUri in kibana.yml to true.`
);
});
it('should respond 400 if trying to upgrade an agent that is unenrolling', async () => {
@ -591,7 +591,7 @@ export default function (providerContext: FtrProviderContext) {
})
.expect(400);
expect(res.body.message).to.eql(
`source_uri is not allowed or recommended in production. Set xpack.fleet.developer.allowAgentUpgradeSourceUri in kibana.yml to enable.`
`source_uri is not allowed or recommended in production. Set xpack.fleet.developer.allowAgentUpgradeSourceUri in kibana.yml to true.`
);
});