Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Jul 7, 2023
1 parent a080d94 commit abc6014
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/server/actions_client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2675,7 +2675,7 @@ describe('update()', () => {
},
})
).rejects.toThrowErrorMatchingInlineSnapshot(
`"Preconfigured action testPreconfigured is not allowed to update."`
`"Preconfigured action testPreconfigured can not be updated."`
);
});

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/server/actions_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export class ActionsClient {
if (foundInMemoryConnector?.isPreconfigured) {
throw new PreconfiguredActionDisabledModificationError(
i18n.translate('xpack.actions.serverSideErrors.predefinedActionUpdateDisabled', {
defaultMessage: 'Preconfigured action {id} is not allowed to update.',
defaultMessage: 'Preconfigured action {id} can not be updated.',
values: {
id,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ export default function createActionTests({ getService }: FtrProviderContext) {
expect(response.body).to.eql({
statusCode: 400,
error: 'Bad Request',
message: 'This custom-system-abc-connector already exist in preconfigured action.',
message:
'This custom-system-abc-connector already exists in a preconfigured action.',
});
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) {
expect(response.body).to.eql({
statusCode: 400,
error: 'Bad Request',
message: `Preconfigured action custom-system-abc-connector is not allowed to update.`,
message: `Preconfigured action custom-system-abc-connector can not be updated.`,
});
break;
default:
Expand Down Expand Up @@ -423,8 +423,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) {
expect(response.body).to.eql({
statusCode: 400,
error: 'Bad Request',
message:
'System action system-connector-test.system-action is not allowed to update.',
message: 'System action system-connector-test.system-action can not be updated.',
});
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function createActionTests({ getService }: FtrProviderContext) {
.expect(400, {
statusCode: 400,
error: 'Bad Request',
message: 'This custom-system-abc-connector already exist in preconfigured action.',
message: 'This custom-system-abc-connector already exists in a preconfigured action.',
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) {
.expect(400, {
statusCode: 400,
error: 'Bad Request',
message: `Preconfigured action custom-system-abc-connector is not allowed to update.`,
message: `Preconfigured action custom-system-abc-connector can not be updated.`,
});
});

Expand All @@ -146,7 +146,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) {
.expect(400, {
statusCode: 400,
error: 'Bad Request',
message: 'System action system-connector-test.system-action is not allowed to update.',
message: 'System action system-connector-test.system-action can not be updated.',
});
});

Expand Down Expand Up @@ -310,7 +310,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) {
.expect(400, {
statusCode: 400,
error: 'Bad Request',
message: `Preconfigured action custom-system-abc-connector is not allowed to update.`,
message: `Preconfigured action custom-system-abc-connector can not be updated.`,
});
});

Expand All @@ -334,7 +334,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) {
.expect(400, {
statusCode: 400,
error: 'Bad Request',
message: 'System action system-connector-test.system-action is not allowed to update.',
message: 'System action system-connector-test.system-action can not be updated.',
});
});

Expand Down

0 comments on commit abc6014

Please sign in to comment.