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

chore: update manager e2e tests #237

Merged
merged 3 commits into from
Aug 31, 2023
Merged

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Aug 30, 2023

Addresses the testing task for #236

Reorganizes the manager tests to have the following structure:

  1. Basic operations based on created projects
  2. Basic operations based on just added projects
  3. Basic operations based on both created and added projects
  4. All of the rest related to the manager

There's probably some redundancy in 1-3 so open to changes there.

@achou11 achou11 requested a review from gmaclennan August 30, 2023 15:26
@achou11 achou11 force-pushed the chore/manager-test-improvements branch from 6a57a16 to 59fa379 Compare August 30, 2023 15:27
@achou11
Copy link
Member Author

achou11 commented Aug 30, 2023

just realizing that there's some overlap with the project-settings e2e tests we have. think the redundancy is fine for now since we only really have settings to work with at the moment, but just noting that in case someone else notices this too

Copy link
Member

@gmaclennan gmaclennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me and all tests pass, so all good.

Could you check whether without the fix in 5a2f8a1 do these tests fail (they should)

@achou11
Copy link
Member Author

achou11 commented Aug 31, 2023

Could you check whether without the fix in 5a2f8a1 do these tests fail (they should)

yep reverting that fix and running the test locally i get the following error:

# Managing both created and added projects
    ok 1 - should be equal
    ok 2 - created project is listed
    ok 3 - added project is listed
    ok 4 - expected truthy value
/Users/andrewchou/GitHub/digidem/mapeo-core-next/node_modules/protobufjs/src/reader.js:382
            throw Error("invalid wire type " + wireType + " at offset " + this.pos);
                  ^

Error: invalid wire type 6 at offset 1
    at Reader.skipType (/Users/andrewchou/GitHub/digidem/mapeo-core-next/node_modules/protobufjs/src/reader.js:382:19)
    at Object.decode (file:///Users/andrewchou/GitHub/digidem/mapeo-core-next/src/generated/keys.js:118:20)
    at #decodeProjectKeysCipher (file:///Users/andrewchou/GitHub/digidem/mapeo-core-next/src/mapeo-manager.js:74:24)
    at MapeoManager.getProject (file:///Users/andrewchou/GitHub/digidem/mapeo-core-next/src/mapeo-manager.js:192:54)
    at file:///Users/andrewchou/GitHub/digidem/mapeo-core-next/test-e2e/manager-basic.js:209:38
    at async Test._run (/Users/andrewchou/GitHub/digidem/mapeo-core-next/node_modules/brittle/index.js:573:7)

@achou11 achou11 merged commit 8083b58 into main Aug 31, 2023
@achou11 achou11 deleted the chore/manager-test-improvements branch August 31, 2023 14:24
gmaclennan added a commit that referenced this pull request Sep 6, 2023
* main: (25 commits)
  add initial implementation of MemberApi (#232)
  feat: $blobs.getUrl and $blobs.create methods (#184)
  chore: update manager e2e tests (#237)
  feat: add capabilities (#231)
  feat: coreOwnership integration [3/3] (#230)
  feat: CoreOwnership class w getOwner & getCoreKey [2/3] (#229)
  feat: handle `coreOwnership` records in `IndexWriter` [1/3] (#214)
  fix: adjust storage options for MapeoManager and MapeoProject (#235)
  implement addProject method for MapeoManager class (#215)
  implement listProjects method for MapeoManager class (#208)
  feat: expose blobStore.writerDriveId (#219)
  implement wrapper client containing createProject and getProject methods (#199)
  add project settings functionality to MapeoProject (#187)
  feat: Add encode/decode for project keys [3/3] (#203)
  feat: update protobuf for RPC [2/3] (#202)
  chore: move protobuf messages into src/generated [1/3] (#201)
  feat: Add internal `dataType.createWithDocId()` (#192)
  chore: explicitly set "mode" opt for encryptionKeys column creation (#186)
  chore: fix linting and type checking (#183)
  chore: consolidate encryption key columns in projectKeys table (#181)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants