Skip to content

Commit

Permalink
change unspecified names
Browse files Browse the repository at this point in the history
  • Loading branch information
mixmix committed May 18, 2023
1 parent c76ead4 commit 4c42d82
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 34 deletions.
8 changes: 4 additions & 4 deletions test/add-member.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ test('addMembers adds to all the tip epochs and gives keys to all the old epochs

const run = Run(t)

const alice = Testbot({ name: 'alice', db2: {} })
const bob = Testbot({ name: 'bob', db2: {} })
const carol = Testbot({ name: 'carol', db2: {} })
const david = Testbot({ name: 'david', db2: {} })
const alice = Testbot({ name: 'alice' })
const bob = Testbot({ name: 'bob' })
const carol = Testbot({ name: 'carol' })
const david = Testbot({ name: 'david' })

await run(
'clients started',
Expand Down
27 changes: 3 additions & 24 deletions test/exclude-members.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,21 +620,8 @@ test('Can exclude a person in a group with a lot of members', async (t) => {
})

test("restarting the client doesn't make us rejoin old stuff", async (t) => {
const alice = Testbot({
keys: ssbKeys.generate(null, 'alice'),
mfSeed: Buffer.from(
'000000000000000000000000000000000000000000000000000000000000a1ce',
'hex'
),
})
let bob = Testbot({
name: 'bobrestart',
keys: ssbKeys.generate(null, 'bob'),
mfSeed: Buffer.from(
'0000000000000000000000000000000000000000000000000000000000000b0b',
'hex'
),
})
const alice = Testbot({ name: 'alice' })
let bob = Testbot({ name: 'bob' })

await Promise.all([alice.tribes2.start(), bob.tribes2.start()])

Expand Down Expand Up @@ -674,15 +661,7 @@ test("restarting the client doesn't make us rejoin old stuff", async (t) => {
await p(bob.close)(true).then(() => t.pass("bob's client was closed"))
await p(setTimeout)(500)

bob = Testbot({
rimraf: false,
name: 'bobrestart',
keys: ssbKeys.generate(null, 'bob'),
mfSeed: Buffer.from(
'0000000000000000000000000000000000000000000000000000000000000b0b',
'hex'
),
})
bob = Testbot({ name: 'bob', rimraf: false })
t.pass('bob got a new client')
await bob.tribes2.start().then(() => t.pass('bob restarted'))

Expand Down
5 changes: 5 additions & 0 deletions test/helpers/testbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ function mfSeedFromName(name) {
'00000000000000000000000000000000000000000000000000000000000da71d',
'hex'
)
case 'oscar':
return Buffer.from(
'0000000000000000000000000000000000000000000000000000000000005ca4',
'hex'
)

default:
throw new Error('no mfSeed set up for ' + name)
Expand Down
3 changes: 1 addition & 2 deletions test/lib/tangles/get-tangle-data.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const Testbot = require('../../helpers/testbot')
const replicate = require('../../helpers/replicate')

test('get-tangle-data unit test', (t) => {
const name = `get-group-tangle-${Date.now()}`
const server = Testbot({ name })
const server = Testbot()

server.metafeeds.findOrCreate(
{ purpose: 'group/additions' },
Expand Down
6 changes: 2 additions & 4 deletions test/list-and-get.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ const Testbot = require('./helpers/testbot')
const replicate = require('./helpers/replicate')

test('tribes.list + tribes.get', (t) => {
const name = `list-and-get-groups-${Date.now()}`
let server = Testbot({ name })
const keys = server.keys
let server = Testbot({ name: 'alice' })

server.tribes2.create(null, (err, group) => {
t.error(err, 'create group')
Expand All @@ -40,7 +38,7 @@ test('tribes.list + tribes.get', (t) => {
server.close(true, (err) => {
t.error(err, 'closes server')

server = Testbot({ name, rimraf: false, keys })
server = Testbot({ name: 'alice', rimraf: false })
pull(
server.tribes2.list(),
pull.collect((err, newList) => {
Expand Down

0 comments on commit 4c42d82

Please sign in to comment.