Fix memory leak issue when using fetch in oidc authentication (#2640)

* test: 💍 test 1

* chore: 🤖 remove waitForPromise use

* chore: 🤖 remove all other waitforpromise usage

* test: 💍 turn down polling

* test: 💍 use .json

* refactor: 💡 add waitForPromise back in & consume response body

* test: 💍 some testing

* test: 💍 more testing

* refactor: 💡 clean-up a bit

* refactor: 💡 use head method request & clean up comments

* refactor: 💡 use get method & consume response body

* test: 💍 fix token validation test cases
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2025-01-03 14:06:27 -08:00
1 parent ca4aad0a2b
commit faf4ecfac6
3 files changed
+18 -5

No files matched your search

@@ -52,7 +52,7 @@ module('Unit | Authenticator | base', function (hooks) {
const authenticator = this.owner.lookup('authenticator:base');
server.get(authenticator.buildTokenValidationEndpointURL(id), () => {
assert.ok(true, 'token validation was requested');
return [200];
return [200, {}, '{}'];
});
await authenticator.restore(mockData);
});
@@ -64,7 +64,7 @@ module('Unit | Authenticator | base', function (hooks) {
const authenticator = this.owner.lookup('authenticator:base');
server.get(authenticator.buildTokenValidationEndpointURL(id), () => {
assert.ok(true, 'token validation was requested');
return [401];
return [401, {}, '{}'];
});
try {
await authenticator.restore(mockData);
@@ -80,7 +80,7 @@ module('Unit | Authenticator | base', function (hooks) {
const authenticator = this.owner.lookup('authenticator:base');
server.get(authenticator.buildTokenValidationEndpointURL(id), () => {
assert.ok(true, 'token validation was requested');
return [404];
return [404, {}, '{}'];
});
try {
await authenticator.restore(mockData);