Ticket #1124 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Seash unit test guest keys are not unique

Reported by: leonwlaw Owned by: leonwlaw
Priority: major Milestone:
Component: - Version: 0.1t
Severity: Medium Keywords:
Cc: monzum, justinc Blocking:
Blocked By:

Description

The public keys that are used by the Seash unit tests are not unique. This may cause a potential problem in the future if multiple instances of the unit test are being run simultaneously, on different machines.

The seash unit tests start a nodemanager with local test vessels. Naturally, these vessels should not be contacted by anyone other than the currently run unit test. However, because of how the browse command functions, all the vessels that contain the above user key will be picked up, including the test vessels on other machines.

Change History

Changed 7 years ago by leonwlaw

  • status changed from new to accepted

My proposal is to generate public keys within the test init script. Since this script is run everytime the program is run, it would give us the new keys that we want. A nice side effect of this method is that we are also able to isolate individual runs of the tests from each other. If the generation process takes too long (we use 3 key pairs) we can simply use a smaller bitsize for the keys (perhaps 29?) as I don't think we'll have that many people running the unit tests simultaneously frequently enough for this to matter.

I imagine it would probably be best if we leave the keys there even after the test has finished to allow debugging if something goes wrong with the tests. We can simply replace the keys if they already exist in the test folder.

Changed 7 years ago by justinc

My guess is that the key generation won't take long so this will be a moot point. Please test it and see though...

Changed 7 years ago by leonwlaw

  • status changed from accepted to closed
  • resolution set to fixed

Turns out it wasn't an issue generating keys with length 1024. The issue is now fixed, seash tests can now run in parallel.

Note: See TracTickets for help on using tickets.