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

Split Secrets and Vault Command Tests into Separate Files #80

Closed
tegefaulkes opened this issue Feb 25, 2022 · 11 comments · Fixed by #125
Closed

Split Secrets and Vault Command Tests into Separate Files #80

tegefaulkes opened this issue Feb 25, 2022 · 11 comments · Fixed by #125
Assignees
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management

Comments

@tegefaulkes
Copy link
Contributor

tegefaulkes commented Feb 25, 2022

Specification

  • tests/bin/secrets/secrets.test.ts (every secrets bin command should have its own test file located in tests/bin/secrets and secrets.test.ts can be removed)
  • tests/bin/vaults/vaults.test.ts (every vaults bin command should have its own test file located in tests/bin/vaults and vaults.test.ts can be removed)
  • tests/client/rpcVaults.test.ts (every vaults client service handler should have its own test file located in tests/client/service and rpcVaults.test.ts can be removed)
  • tests/agent/GRPCClientAgent.test.ts (every vaults agent service handler should have its own test file located in tests/agent/service and all vaults-related tests can be removed from GRPCClientAgent.test.ts)

Additional context

Tasks

  1. Expand out spec and tasklist
@CMCDragonkai
Copy link
Member

Came out of MatrixAI/Polykey#266 (comment)

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Mar 11, 2022

Recommend doing this as well:

  1. The usage of jest.mock is @/keys/utils should be replaced with the usage of the setupGlobalKeypair utility.

@CMCDragonkai
Copy link
Member

The tests will require different NodeIds to work.

@CMCDragonkai
Copy link
Member

@emmacasolin is this done as part of MatrixAI/Polykey#374?

@emmacasolin
Copy link

emmacasolin commented Jun 6, 2022

Not all of it. I only split the client service tests so the bin tests still need doing. There are also missing tests for some of the client and agent vaults/secrets service handlers, and this might be the case for the bin tests as well.


Specifically, the missing tests are for

  • vaultsClone (client service)
  • vaultsPull (client service)
  • vaultsScan (client service)
  • vaultsGitInfoPack (agent service)
  • vaultsGitPackGet (agent service)
  • vaultsScan (agent service)

And although not part of the vaults domain there are also no tests for these (although they might be added in the Testnet Deployment PR?)

  • nodesChainDataGet (agent service)
  • nodesClosestLocalNodesGet (agent service)
  • nodesHolePunchMessageSend (agent service)

@CMCDragonkai
Copy link
Member

Ok so those are just missing tests, that's a different issue.

Only the bin tests still need to be split, and once split, this issue can be resolved.

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jun 6, 2022

Can address this next sprint 23.

@teebirdy teebirdy added the r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management label Jul 24, 2022
@tegefaulkes
Copy link
Contributor Author

This is quick but also very low priority right now.

@CMCDragonkai
Copy link
Member

Can be done during CLI factoring out.

@tegefaulkes
Copy link
Contributor Author

Vaults tests are the slowest tests on the CI right now. I'm considering working on this sooner rather than later. I also need to look into optimising the vaults code. It is very slow when doing vault operations. Hopefully it's a problem with our code and not isomorphic git.

@tegefaulkes tegefaulkes removed their assignment Dec 13, 2023
@CMCDragonkai CMCDragonkai transferred this issue from MatrixAI/Polykey Dec 15, 2023
@CMCDragonkai CMCDragonkai changed the title Test splitting of vaults domain Split Secrets and Vault Command Tests into Separate Files Dec 15, 2023
@CMCDragonkai
Copy link
Member

This is moved into PK CLI because only 2 things in the spec are relevant now to the PK CLI since the bin was factored out.

Vaults tests is a separate problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management
Development

Successfully merging a pull request may close this issue.

4 participants