Skip to content

Commit

Permalink
dynamic user id
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimpe committed Dec 20, 2024
1 parent c6825d0 commit c9c5fe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions performance-tests/tests/data-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const scenarios = {
},
api: {
exec: 'dataFileApiSubmission',
...loadProfiles.ramping,
...loadProfiles.unit,
}
}

Expand All @@ -58,13 +58,14 @@ export const options = {
};

export const dataFileApiSubmission = async () => {
login()
let res = login()
let userId = res.json().users[0].id
const httpCookies = http.cookieJar().cookiesForURL(__ENV.BASE_URL)

const body = {
file: http.file(file, 'loadtest-file.txt'),
original_filename: 'ADS.E2J.FTP2.TS06',
user: 'f94b3a2e-4ee5-4d4b-bab3-20147cb6f480',
user: userId,
section: 'Closed Case Data',
year: '2021',
stt: 4,
Expand Down
2 changes: 2 additions & 0 deletions performance-tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const login = (username = 'cypress-admin@teamraft.com') => {
JSON.stringify(body),
{ headers: { 'Content-Type': 'application/json' } },
);

return res
}

export const attachAuthCookiesToBrowser = (context) => {
Expand Down

0 comments on commit c9c5fe5

Please sign in to comment.