Skip to content

Commit

Permalink
adjusted tests post merge of elastic#56814
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Feb 14, 2020
1 parent f4af232 commit ed4e3bd
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,24 +184,6 @@ export const getPrepackagedRulesStatusRequest = (): ServerInjectOptions => ({
url: `${DETECTION_ENGINE_PREPACKAGED_URL}/_status`,
});

export const importRulesRequest = (payload?: Buffer): ServerInjectOptions => ({
method: 'POST',
url: `${DETECTION_ENGINE_RULES_URL}/_import`,
headers: {
'Content-Type': 'multipart/form-data; boundary=frank_is_awesome',
},
payload,
});

export const importRulesRequestOverwriteTrue = (payload?: Buffer): ServerInjectOptions => ({
method: 'POST',
url: `${DETECTION_ENGINE_RULES_URL}/_import?overwrite=true`,
headers: {
'Content-Type': 'multipart/form-data; boundary=frank_is_awesome',
},
payload,
});

export interface FindHit {
page: number;
perPage: number;
Expand Down Expand Up @@ -242,6 +224,24 @@ export const getFindResultWithMultiHits = ({
};
};

export const getImportRulesRequest = (payload?: Buffer): ServerInjectOptions => ({
method: 'POST',
url: `${DETECTION_ENGINE_RULES_URL}/_import`,
headers: {
'Content-Type': 'multipart/form-data; boundary=frank_is_awesome',
},
payload,
});

export const getImportRulesRequestOverwriteTrue = (payload?: Buffer): ServerInjectOptions => ({
method: 'POST',
url: `${DETECTION_ENGINE_RULES_URL}/_import?overwrite=true`,
headers: {
'Content-Type': 'multipart/form-data; boundary=frank_is_awesome',
},
payload,
});

export const getDeleteRequest = (): ServerInjectOptions => ({
method: 'DELETE',
url: `${DETECTION_ENGINE_RULES_URL}?rule_id=rule-1`,
Expand Down
Loading

0 comments on commit ed4e3bd

Please sign in to comment.