Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update query from /derive to the new /query endpoint #1184

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: true
matrix:
environment-name: ["ESS PodSpaces", "ESS Dev-2-2"]
environment-name: ["ESS PodSpaces"]
experimental: [false]
include:
- environment-name: "ESS Dev-2-3"
Expand Down
20 changes: 10 additions & 10 deletions src/gConsent/manage/getAccessGrantAll.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe("getAccessGrantAll", () => {
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalled();

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedDefaultVcShape),
expect.objectContaining({
// Expecting fetch to match universal-fetch fails in node because the
Expand All @@ -106,13 +106,13 @@ describe("getAccessGrantAll", () => {

await getAccessGrantAll(
{ requestor },
{ accessEndpoint: "https://some.api.endpoint/derive" },
{ accessEndpoint: "https://some.api.endpoint/query" },
);

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalled();

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedDefaultVcShape),
expect.objectContaining({
// Expecting fetch to match universal-fetch fails in node because the
Expand Down Expand Up @@ -153,7 +153,7 @@ describe("getAccessGrantAll", () => {
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalled();

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedVcShape),
{
fetch: otherFetch,
Expand Down Expand Up @@ -188,7 +188,7 @@ describe("getAccessGrantAll", () => {
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalled();

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedVcShape),
{
fetch: otherFetch,
Expand Down Expand Up @@ -223,7 +223,7 @@ describe("getAccessGrantAll", () => {
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalled();

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedVcShape),
{
fetch: otherFetch,
Expand Down Expand Up @@ -258,7 +258,7 @@ describe("getAccessGrantAll", () => {
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledTimes(4);

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedVcShapeOpen),
{
fetch: otherFetch,
Expand Down Expand Up @@ -296,7 +296,7 @@ describe("getAccessGrantAll", () => {
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalled();

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedVcShape),
{
fetch: otherFetch,
Expand Down Expand Up @@ -334,7 +334,7 @@ describe("getAccessGrantAll", () => {
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalled();

expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.objectContaining(expectedVcShape),
{
fetch: otherFetch,
Expand All @@ -353,7 +353,7 @@ describe("getAccessGrantAll", () => {
},
);
expect(getVerifiableCredentialAllFromShape).toHaveBeenCalledWith(
"https://some.api.endpoint/derive",
"https://some.api.endpoint/query",
expect.anything(),
expect.objectContaining({
// FIXME: expecting fetch to match crossFetch fails in node.
Expand Down
4 changes: 2 additions & 2 deletions src/gConsent/manage/getAccessGrantAll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ async function getAccessGrantAll(
const sessionFetch = await getSessionFetch(options);
// TODO: Fix access API endpoint retrieval (should include all the different API endpoints)
const queryEndpoint = options.accessEndpoint
? new URL("derive", options.accessEndpoint)
? new URL("query", options.accessEndpoint)
: new URL(
"derive",
"query",
await getAccessApiEndpoint(params.resource as string, options),
);

Expand Down
Loading