XMLWordPrintable

    Details

      Description

      Update AuthorizationService.js to support that gpii.oauth2.dbDataSource API returns promises rather than the direct data returned by the in memory data store.

      To update gpii.oauth2.authorizationService, as well as other components that depend on the oauth2 data store, we will need to determine a strategy to test such components.

      Until now, we test components that depend on the oauth2 data store against the gpii.oauth2.inMemoryDataStore. With the move to CouchDB, the new data store API returns promises and we can no longer use the gpii.oauth2.inMemoryDataStore in tests as is. We will need to do some work to update the unit tests for components that depend on the oauth2 data store. Some options:

      1. Continue to maintain the gpii.oauth2.inMemoryDataStore and update it to return promises
      2. Mock the oauth2 data store (for example, using Sinon.js)
      3. Use PouchDB in the browser-based unit tests
      4. Convert the current browser-based unit tests into Node.js tests and use the existing GPII PouchDB testing infrastrucrure

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cli@ocad.ca Cindy Qi Li
              Reporter:
              cli@ocad.ca Cindy Qi Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: