Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
machadoum committed Jun 11, 2024
1 parent 87aef36 commit dcccaa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default ({ getService }: FtrProviderContext) => {
});

it('adds exception items to rule default exception list', async () => {
const username = utils.getUsername();
const username = await utils.getUsername();
// create default exception list
const exceptionList: CreateExceptionListSchema = {
...getCreateExceptionListMinimalSchemaMock(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,11 @@ export default ({ getService }: FtrProviderContext) => {
const sidecarActionsPostResults = await getLegacyActionSO(es);
expect(sidecarActionsPostResults.hits.hits.length).to.eql(0);

const username = await utils.getUsername();
// @ts-expect-error
body.forEach((response) => {
const bodyToCompare = removeServerGeneratedProperties(response);
const outputRule = updateUsername(
getSimpleRuleOutput(response.rule_id, false),
await utils.getUsername()
);
const outputRule = updateUsername(getSimpleRuleOutput(response.rule_id, false), username);

outputRule.actions = [
{
Expand Down

0 comments on commit dcccaa4

Please sign in to comment.