near / near-workspaces-js

Write tests once, run them both on NEAR TestNet and a controlled NEAR Sandbox local environment
https://near.github.io/near-workspaces-js/
GNU General Public License v3.0
44 stars 23 forks source link

fix: create random folder for server & use a port checker to assign port #16

Closed willemneal closed 3 years ago

willemneal commented 3 years ago

This changes the constructor of Runtimes to be async as sub classes now add an static async createRuntime function that handles setting up the config and passes that to the constructor which now expects a non Partial Config.

Then an initial port is chosen at random between 0-10000, then port checker finds the next available port. Lastly the homedir now doesn't rely on port and is now created as an uuid.

willemneal commented 3 years ago

Just realized we need to have multiple files to test if this works.