Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Intra-conductor link propagation #2043

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app_spec/test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,18 @@ const logger = {
const commonConfig = { logger, network }

module.exports = {
dna,
one: Config.gen({
app: dna
},
commonConfig
),
twoSame: Config.gen({
app1: dna,
app2: dna,
},
commonConfig
),
two: Config.gen({
app1: dna,
app2: dna2
Expand Down
30 changes: 29 additions & 1 deletion app_spec/test/files/links.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
const { one, two } = require('../config')
const { one, twoSame } = require('../config')
const { Config } = require('@holochain/tryorama')

module.exports = scenario => {

scenario('links propagate within a single conductor', async (s, t) => {
const { alice } = await s.players({alice: twoSame}, true)

const base = alice.info('app1').agentAddress

await alice.call('app1', 'simple', 'create_link',
{ base, target: 'Posty' }
)

await s.consistency()

const posts1 = await alice.call('app2', 'simple', 'get_my_links',
{ base, status_request: 'Live' }
)

const posts2 = await alice.call('app2', 'simple', 'get_my_links',
{ base, status_request: 'Live' }
)

t.ok(posts1.Ok)
t.equal(posts1.Ok.links.length, 1)
t.ok(posts2.Ok)
t.equal(posts2.Ok.links.length, 1)

})

scenario('delete_post', async (s, t) => {
const { alice, bob } = await s.players({ alice: one, bob: one }, true)

Expand Down