Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from JupiterOne/INT-10579-3
Browse files Browse the repository at this point in the history
INT-10579: add missing chaining character
  • Loading branch information
gastonyelmini authored Apr 2, 2024
2 parents 396a267 + 78cce6a commit 5d17cd2
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 88 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class APIClient {
const requestOpts: GaxiosOptions = {
url:
this.BASE_URL +
`/ds-connections?skip=${count}limit=100&requireTotalCount=true`,
`/ds-connections?skip=${count}&limit=100&requireTotalCount=true`,
method: 'GET',
headers: this.headers,
};
Expand Down Expand Up @@ -294,7 +294,7 @@ export class APIClient {
const requestOpts: GaxiosOptions = {
url:
this.BASE_URL +
`/access-management/users?skip=${count}limit=100&requireTotalCount=true`,
`/access-management/users?skip=${count}&limit=100&requireTotalCount=true`,
method: 'GET',
headers: this.headers,
};
Expand Down
138 changes: 52 additions & 86 deletions src/steps/users/__recordings__/fetch-users_2464296442/recording.har
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"entries": [
{
"_id": "bd450f19236c57a8dd6a0fe1f1c195fd",
"_id": "aa33ceaf98a63b8bd52b3986a9ee06cb",
"_order": 0,
"cache": {},
"request": {
Expand Down Expand Up @@ -40,95 +40,76 @@
"name": "accept-encoding",
"value": "gzip,deflate"
},
{
"_fromType": "array",
"name": "connection",
"value": "close"
},
{
"name": "host",
"value": "sandbox.bigid.tools"
}
],
"headersSize": 721,
"headersSize": 282,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [],
"url": "https://sandbox.bigid.tools/api/v1/refresh-access-token"
"url": "http://sandbox.bigid.tools/api/v1/refresh-access-token"
},
"response": {
"bodySize": 362,
"bodySize": 43,
"content": {
"mimeType": "text/html; charset=utf-8",
"size": 362,
"mimeType": "application/json",
"size": 43,
"text": "{\"success\":true,\"systemToken\":\"[REDACTED]\"}"
},
"cookies": [
{
"expires": "2023-05-17T16:57:22.000Z",
"httpOnly": true,
"name": "LAUNCHER",
"path": "/",
"sameSite": "Lax",
"value": "[REDACTED]"
}
],
"cookies": [],
"headers": [
{
"name": "date",
"value": "Tue, 16 May 2023 16:57:22 GMT"
},
{
"name": "content-type",
"value": "text/html; charset=utf-8"
"value": "application/json"
},
{
"name": "content-length",
"value": "362"
"name": "authorization",
"value": "[REDACTED]"
},
{
"name": "connection",
"value": "close"
"name": "accept",
"value": "application/json"
},
{
"name": "x-powered-by",
"value": "Express"
"name": "user-agent",
"value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
},
{
"name": "access-control-allow-origin",
"value": "*"
"name": "accept-encoding",
"value": "gzip,deflate"
},
{
"name": "etag",
"value": "W/\"16a-d1A4MaAI+kKLU7GOkJCAJwq7uy0\""
"name": "connection",
"value": "close"
},
{
"_fromType": "array",
"name": "set-cookie",
"value": "[REDACTED]"
"name": "host",
"value": "sandbox.bigid.tools"
}
],
"headersSize": 393,
"headersSize": 232,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-05-16T16:57:22.475Z",
"time": 234,
"startedDateTime": "2024-04-02T19:36:20.442Z",
"time": 61,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 234
"wait": 61
}
},
{
"_id": "1270a2c987178b6f1df88981286532c6",
"_order": 0,
"_id": "aa33ceaf98a63b8bd52b3986a9ee06cb",
"_order": 1,
"cache": {},
"request": {
"bodySize": 0,
Expand Down Expand Up @@ -159,99 +140,84 @@
"name": "accept-encoding",
"value": "gzip,deflate"
},
{
"_fromType": "array",
"name": "connection",
"value": "close"
},
{
"name": "host",
"value": "sandbox.bigid.tools"
}
],
"headersSize": 665,
"headersSize": 325,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [
{
"name": "skip",
"value": "0limit=100"
"value": "0"
},
{
"name": "limit",
"value": "100"
},
{
"name": "requireTotalCount",
"value": "true"
}
],
"url": "https://sandbox.bigid.tools/api/v1/access-management/users?skip=0limit%3D100&requireTotalCount=true"
"url": "http://sandbox.bigid.tools/api/v1/access-management/users?skip=0&limit=100&requireTotalCount=true"
},
"response": {
"bodySize": 2246,
"content": {
"mimeType": "text/html; charset=utf-8",
"mimeType": "application/json",
"size": 2246,
"text": "{\"status\":\"success\",\"statusCode\":200,\"data\":{\"users\":[{\"_id\":\"5d93e8605bc88e001af828c2\",\"created_at\":\"2019-10-01T23:59:28.596Z\",\"updated_at\":\"2023-05-16T16:54:25.981Z\",\"name\":\"bigid\",\"firstName\":\"BigID Admin\",\"password\":\"\",\"admin\":true,\"__v\":0,\"roleIds\":[\"5d93e8605bc88e001af828c3\",\"5f8d949d6c2f4e0013db258f\"],\"last_successful_login_at\":\"2023-05-16T16:54:25.598Z\",\"token\":\"\",\"isPasswordChangeNeeded\":false,\"lastName\":\"\",\"origin\":\"local\",\"refreshTokens\":[{\"tokenName\":\"e18524df-f90b-410f-9bef-4436d5f0b40d\",\"creationDate\":\"2023-05-16T16:54:25.846Z\",\"expirationDate\":\"2023-05-17T16:54:25.846Z\",\"value\":\"\"}],\"id\":\"bigid\"},{\"_id\":\"5eadb8b749c26e64bdc55857\",\"updated_at\":\"2020-05-02T18:15:19.535Z\",\"created_at\":\"2020-05-02T18:15:19.535Z\",\"name\":\"bigid-scanner\",\"firstName\":\"BigID\",\"lastName\":\"Scanner\",\"origin\":\"local\",\"roleIds\":[\"5eadb8b744c4730013926fec\"],\"token\":\"\",\"password\":\"\",\"id\":\"bigid-scanner\"},{\"_id\":\"5d94a53bd24330957632b9c2\",\"updated_at\":\"2020-10-19T13:26:33.975Z\",\"created_at\":\"2019-10-02T13:25:15.303Z\",\"name\":\"[email protected]\",\"firstName\":\"David\",\"lastName\":\"Vincent\",\"origin\":\"local\",\"password\":\"\",\"roleIds\":[\"5d93e8605bc88e001af828c5\"],\"last_successful_login_at\":\"2020-03-17T22:38:18.073Z\",\"token\":\"\",\"email\":null,\"id\":\"[email protected]\"},{\"_id\":\"5d94a512d24330957632b955\",\"updated_at\":\"2020-10-19T13:27:45.337Z\",\"created_at\":\"2019-10-02T13:24:34.502Z\",\"name\":\"[email protected]\",\"firstName\":\"Ellen\",\"lastName\":\"Becker\",\"origin\":\"local\",\"password\":\"\",\"roleIds\":[\"5d93e8605bc88e001af828c5\"],\"last_successful_login_at\":\"2019-12-28T23:56:55.091Z\",\"token\":\"\",\"email\":null,\"id\":\"[email protected]\"},{\"_id\":\"5e890909bad2a83c81ae136b\",\"updated_at\":\"2023-02-26T19:00:32.219Z\",\"created_at\":\"2020-04-04T22:24:09.081Z\",\"name\":\"learner\",\"firstName\":\"BigID Learner\",\"lastName\":\"\",\"origin\":\"local\",\"password\":\"\",\"roleIds\":[\"5f8d949d6c2f4e0013db258f\",\"5d93e8605bc88e001af828c6\"],\"email\":\"\",\"last_successful_login_at\":\"2023-02-26T19:00:32.219Z\",\"token\":\"\",\"refreshTokens\":[{\"tokenName\":\"aa949e3e-04b8-49b1-aa14-3811ca7397c3\",\"creationDate\":\"2021-11-02T15:07:18.643Z\",\"expirationDate\":\"2024-07-28T15:07:18.643Z\",\"value\":\"\"}],\"isPasswordChangeNeeded\":false,\"id\":\"learner\"}],\"totalCount\":5},\"message\":null}"
},
"cookies": [
{
"expires": "2023-05-17T16:57:22.000Z",
"httpOnly": true,
"name": "LAUNCHER",
"path": "/",
"sameSite": "Lax",
"value": "[REDACTED]"
}
],
"cookies": [],
"headers": [
{
"name": "date",
"value": "Tue, 16 May 2023 16:57:22 GMT"
},
{
"name": "content-type",
"value": "text/html; charset=utf-8"
"value": "application/json"
},
{
"name": "content-length",
"value": "2246"
"name": "authorization",
"value": "[REDACTED]"
},
{
"name": "connection",
"value": "close"
"name": "accept",
"value": "application/json"
},
{
"name": "x-powered-by",
"value": "Express"
"name": "user-agent",
"value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
},
{
"name": "access-control-allow-origin",
"value": "*"
"name": "accept-encoding",
"value": "gzip,deflate"
},
{
"name": "etag",
"value": "W/\"8c6-c79loGhc2FBeEy/4zHTrFcNy+iM\""
"name": "connection",
"value": "close"
},
{
"_fromType": "array",
"name": "set-cookie",
"value": "[REDACTED]"
"name": "host",
"value": "sandbox.bigid.tools"
}
],
"headersSize": 394,
"headersSize": 232,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-05-16T16:57:22.719Z",
"time": 141,
"startedDateTime": "2024-04-02T19:36:20.508Z",
"time": 6,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 141
"wait": 6
}
}
],
Expand Down
5 changes: 5 additions & 0 deletions src/steps/users/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ test('fetch-users', async () => {
recording = setupProjectRecording({
directory: __dirname,
name: 'fetch-users',
options: {
matchRequestsBy: {
url: false,
},
},
});

const stepConfig = buildStepTestConfigForStep(Steps.USER);
Expand Down

0 comments on commit 5d17cd2

Please sign in to comment.