opts.pathString (optional) (default: /tmp/${name}, where name is the above)
~/.ssb-test: Sets the database in ~/.ssb-test
opts.keysString (optional) (default: scuttle-testbot generates a new set of random keys)
you can create your own keys with ssbKeys.generate()
opts.rimraf (default: true)
false: Don't delete an existing database before starting up.
this is useful if you want to test state after stopping and starting a server. In this case you need to set the name and keys options to be connecting to the same log
note opts.startUnclean is still accepted
opts.db1 (default: false)
uses ssb-db2 by default, but if true will use ssb-db
your can also switch to db1 by setting the ENV SSB_DB1=true
opts.noDefaultUse (default: false)
if true then the testbot uses neither db1 nor db2 by default, leaving that up to you. Useful e.g. in case you want to control what plugins get imported along with db2.
TestBot.use(plugin)
CreateTestSbot.use lets you add ssb-server plugins. use can be chained the same as the ssb-server api.
Example:
function Server (opts) { const stack = Testbot .use('ssb-master') .use('ssb-tribes') return stack(opts)}
Testbot.replicate({ from, to, feedId?, live?, name?, log? }, done)
Replicates data from one testbot to another, which is sometimes needed when you have functions
which are only triggered by another feedId, e.g. when I am added to a private group someone else started.