[ARVADOS-WORKBENCH2] updated: 1.4.1-212-gea35db0f
Git user
git at public.arvados.org
Tue Jan 21 15:07:09 UTC 2020
Summary of changes:
src/services/common-service/common-resource-service.test.ts | 12 ++++++++++++
1 file changed, 12 insertions(+)
via ea35db0fe5387ed9cca2f8a8fabeaea10f89de67 (commit)
from 22a3f54534652000e7f0b537487e68572b403dcb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ea35db0fe5387ed9cca2f8a8fabeaea10f89de67
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Tue Jan 21 12:06:00 2020 -0300
15672: Adds test for params being just under the limit of needing POST.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/src/services/common-service/common-resource-service.test.ts b/src/services/common-service/common-resource-service.test.ts
index 943325b7..2a18ce23 100644
--- a/src/services/common-service/common-resource-service.test.ts
+++ b/src/services/common-service/common-resource-service.test.ts
@@ -124,4 +124,16 @@ describe("CommonResourceService", () => {
expect(axiosMock.history.post[0].data.get('filters')).toBe(`[${tooBig}]`);
expect(axiosMock.history.post[0].params._method).toBe('GET');
});
+
+ it("#list using GET when query string is not too big", async () => {
+ axiosMock
+ .onAny("/resource")
+ .reply(200);
+ const notTooBig = 'x'.repeat(1480);
+ const commonResourceService = new CommonResourceService(axiosInstance, "resource", actions);
+ await commonResourceService.list({ filters: notTooBig });
+ expect(axiosMock.history.post.length).toBe(0);
+ expect(axiosMock.history.get.length).toBe(1);
+ expect(axiosMock.history.get[0].params.filters).toBe(`[${notTooBig}]`);
+ });
});
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list