Skip to content

Instantly share code, notes, and snippets.

@samrose
Created July 2, 2019 18:56
Show Gist options
  • Save samrose/ad845b8ffde094ad026b8c40fea8da0b to your computer and use it in GitHub Desktop.
Save samrose/ad845b8ffde094ad026b8c40fea8da0b to your computer and use it in GitHub Desktop.
npm test
> @holo-host/[email protected] test /home/vagrant/envoy
> npm run test:unit && npm run test:integration
> @holo-host/[email protected] test:unit /home/vagrant/envoy
> ENVOY_TEST=1 ts-node test/unit | faucet
✓ can install dnas
# throws error for non-hosted happId
getHappHashFromHHA returned error: { Err: 'this is not the real error, but it is an error' }
✓ throws error for non-hosted happIdld simply mean that the entry was not found. TODO: differentiate the two.
✓ throws error for unreachable resources
✓ can install dnas and ui for hApp
✓ can setup instances
✓ can setup servicelogger
✓ can perform entire installation flow
✓ can host new agent
# can idempotently add existing agent
✓ can idempotently add existing agents, skipping...
✓ can only host agent for enabled app (1 DNA)
✓ can only host agent for enabled app (3 DNAs)
✓ can calculate metrics
✓ lookupDnaByHandle can search HHA and hApp store for DNA
✓ lookupHoloInstance can find an instance
✓ can call public zome function
✓ can sign things across the wormhole
✓ can sign responses for servicelogger later
# tests 74
# pass 74
✓ ok
> @holo-host/[email protected] test:integration /home/vagrant/envoy
> ts-node test/integration
TAP version 13
# can do public zome call
Created directory for integration tests: /run/user/1000/holo-envoy/test-storage-u0nkgL
Cleared storage.
Creating new key data at /run/user/1000/holo-envoy/test-keydata
Generated keys.
Creating conductor config at: /run/user/1000/holo-envoy/test-storage-u0nkgL/conductor-config.toml
Generated config.
Using conductor binary: /nix/store/kfih46l7cci6xv6wb3jhpcrxmm0wlci5-holochain/bin/holochain
required holochain version: 0.0.18-alpha1
installed holochain version: 0.0.18-alpha1
(HC) Using config path: /run/user/1000/holo-envoy/test-storage-u0nkgL/conductor-config.toml
Unlocking agent keys:
Unlocking key for agent 'host-agent':
Reading keystore from /run/user/1000/holo-envoy/test-keydata/keybundle.json
auto-entering passphrase...
Connecting to admin and happ interfaces...
(HC) Passphrase:
(HC) Reading DNA from /home/vagrant/envoy/src/config/.envoy-deps/holo-hosting.dna.json
(HC) Failed to load instance holo-hosting-app from storage: ErrorGeneric("State could not be loaded due to NoneError")
(HC) Initializing new chain...
(HC) <E> WARNING! The git-hash of the runtime and the zome don't match.
(HC) <E> Runtime hash:
(HC) <E> 2ece132a3fe12bd9e3475fe8e79de327950db597
(HC) <E>
(HC) <E> Zome hash:
(HC) <E> 6f20397185401b7e0f4356d5096c990524c999b7
(HC) <E>
(HC) <E> WARNING! The git-hash of the runtime and the zome don't match.
(HC) <E> Runtime hash:
(HC) <E> 2ece132a3fe12bd9e3475fe8e79de327950db597
(HC) <E>
(HC) <E> Zome hash:
(HC) <E> 6f20397185401b7e0f4356d5096c990524c999b7
(HC) <E>
(HC) <E> WARNING! The git-hash of the runtime and the zome don't match.
(HC) <E> Runtime hash: 2ece132a3fe12bd9e3475fe8e79de327950db597
Zome hash: 6f20397185401b7e0f4356d5096c990524c999b7
(HC) Reading DNA from /home/vagrant/envoy/src/config/.envoy-deps/happ-store.dna.json
(HC) Failed to load instance happ-store from storage: ErrorGeneric("State could not be loaded due to NoneError")
Initializing new chain...
(HC) Reading DNA from /home/vagrant/envoy/src/config/.envoy-deps/holofuel.dna.json
(HC) Failed to load instance holofuel from storage: ErrorGeneric("State could not be loaded due to NoneError")
Initializing new chain...
(HC) adding ui interface hha-ui-interface
adding ui interface happ-store-ui-interface
adding ui interface holofuel-gui-interface
Successfully loaded 3 instance configurations
Starting instances...
Starting instance "happ-store"...
Starting instance "holo-hosting-app"...
Starting instance "holofuel"...
Starting interfaces...
(HC) Done.
Starting UI servers
Starting all servers
About to serve path "/home/vagrant/envoy/src/config/.envoy-deps/holofuel-gui" at http://127.0.0.1:8088
(HC) Server started for "holofuel-gui-interface"
About to serve path "/home/vagrant/envoy/src/config/.envoy-deps/happ-store-ui" at http://127.0.0.1:8880
Server started for "happ-store-ui-interface"
About to serve path "/home/vagrant/envoy/src/config/.envoy-deps/holo-hosting-ui" at http://127.0.0.1:8800
Server started for "hha-ui-interface"
Listening on http://127.0.0.1:8880
Listening on http://127.0.0.1:8088
(HC) Listening on http://127.0.0.1:8800
All connections established! [ 'master' ] . Starting...
Beginning server startup
Serving all UIs from: /home/vagrant/.holochain/holo/ui-store
HTTP server initialized
WS server initialized
Admin HTTP server listening on port 9999
Wormhole HTTP server listening on port 8888
Websocket server listening on port 48080
HTTP server running on port 48080
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), target: HashString("QmVqXK7B8kX2evVHDvmeWN6etF2pguAj8CS2YumK3z5tdo"), link_type: "verified_provider_tag", tag: "" }
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "provider",
"function": "register_as_provider",
"args": {
"provider_doc": {
"kyc_proof": "TODO this proves nothing"
}
}
}
response <----- (object)
{
"Ok": "QmVqXK7B8kX2evVHDvmeWN6etF2pguAj8CS2YumK3z5tdo"
}
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), target: HashString("QmdYapWwAuKubQ5UUFTjK49jbbK4ZAAXAA4asycDrEUNTg"), link_type: "verified_host_tag", tag: "" }
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "host",
"function": "register_as_host",
"args": {
"host_doc": {
"kyc_proof": "TODO this proves nothing"
}
}
}
response <----- (object)
{
"Ok": "QmdYapWwAuKubQ5UUFTjK49jbbK4ZAAXAA4asycDrEUNTg"
}
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"), target: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), link_type: "author_is", tag: "" }
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), target: HashString("QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"), link_type: "published", tag: "" }
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmQMvS6qyiQW97cstXxMX76tigSmYW8M8Lkd9osQEDS3H5"), target: HashString("QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"), link_type: "contains", tag: "" }
(HC) 2019-07-02 18:55:15 ThreadId(1):happ-store: err/instance/process_action: could not save state: ErrorGeneric("Could not get write lock on storage")
2019-07-02 18:55:15 ThreadId(1):happ-store: err/instance/process_action: could not save state: ErrorGeneric("Could not get write lock on storage")
2019-07-02 18:55:15 ThreadId(1):happ-store: err/instance/process_action: could not save state: ErrorGeneric("Could not get write lock on storage")
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"), target: HashString("QmQMvS6qyiQW97cstXxMX76tigSmYW8M8Lkd9osQEDS3H5"), link_type: "in", tag: "" }
WS call: call
request ------> (object)
{
"instance_id": "happ-store",
"zome": "happs",
"function": "create_app",
"args": {
"title": "TODO",
"description": "TODO",
"thumbnail_url": "TODO.gif",
"homepage_url": "TODO.com",
"ui": {
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat-0.0.4.zip",
"hash": "FAKEHASH"
},
"dnas": [
{
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat.dna.json",
"hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"handle": "basic-chat-handle"
}
]
}
}
response <----- (object)
{
"Ok": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
}
(HC) 2019-07-02 18:55:15 ThreadId(1):happ-store: err/instance/process_action: could not save state: ErrorGeneric("Could not get write lock on storage")
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with [HashString("QmS6EfercPfwJtoUEMV6oMXvBYurbJCyCpXpDPeMhNWgYm")]
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([String("QmS6EfercPfwJtoUEMV6oMXvBYurbJCyCpXpDPeMhNWgYm")])]
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmaaU36FvTxKS9Jof1TroBkBmgCztrwnEZA2UDR2reFcDn"), target: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), link_type: "all_apps_tag", tag: "" }
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), target: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), link_type: "my_registered_apps_tag", tag: "" }
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with [HashString("QmS6EfercPfwJtoUEMV6oMXvBYurbJCyCpXpDPeMhNWgYm")]
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([String("QmS6EfercPfwJtoUEMV6oMXvBYurbJCyCpXpDPeMhNWgYm")])]
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmYQgujE3iQ228ev8DeZtusbD694dQzShGyzcW8viLsPZ8"), target: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), link_type: "app_hash_tag", tag: "" }
(HC) 2019-07-02 18:55:15 ThreadId(1):holo-hosting-app: err/instance/process_action: could not save state: ErrorGeneric("Could not get write lock on storage")
(HC) 2019-07-02 18:55:15 ThreadId(1):holo-hosting-app: err/instance/process_action: could not save state: ErrorGeneric("Could not get write lock on storage")
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), target: HashString("QmYQgujE3iQ228ev8DeZtusbD694dQzShGyzcW8viLsPZ8"), link_type: "domain_name_tag", tag: "" }
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), target: HashString("QmYQgujE3iQ228ev8DeZtusbD694dQzShGyzcW8viLsPZ8"), link_type: "new_domain_name_tag", tag: "" }
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "provider",
"function": "register_app",
"args": {
"app_bundle": {
"happ_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
},
"domain_name": {
"dns_name": "TODO.whatever.xyz"
}
}
}
response <----- (object)
{
"Ok": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
registered hApp: QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K
Installing hApp QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "provider",
"function": "get_app_details",
"args": {
"app_hash": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
}
response <----- (object)
{
"Ok": {
"app_bundle": {
"happ_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
},
"payment_pref": []
}
}
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "happ-store",
"zome": "happs",
"function": "get_app",
"args": {
"app_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
}
}
response <----- (object)
{
"Ok": {
"address": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu",
"appEntry": {
"title": "TODO",
"author": "Envoy Host",
"description": "TODO",
"thumbnailUrl": "TODO.gif",
"homepageUrl": "TODO.com",
"dnas": [
{
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat.dna.json",
"hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"handle": "basic-chat-handle"
}
],
"ui": {
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat-0.0.4.zip",
"hash": "FAKEHASH",
"handle": null
}
},
"upvotes": 0,
"upvotedByMe": false
}
}
using tempdir /run/user/1000/happ-bundle-YQPvkn
Downloading UI: { location: 'https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat-0.0.4.zip',
hash: 'FAKEHASH',
handle: null }
Starting streaming download...
Unbundling...
Starting streaming download...
DNAs: [ '/run/user/1000/happ-bundle-YQPvkn/QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC.dna.json' ]
UI: /run/user/1000/happ-bundle-YQPvkn/FAKEHASH
WS call: admin/dna/list
request ------> (object)
{}
response <----- (object)
[
{
"id": "holo-hosting-app",
"hash": null
},
{
"id": "happ-store",
"hash": null
},
{
"id": "holofuel",
"hash": null
}
]
(HC) Reading DNA from /run/user/1000/happ-bundle-YQPvkn/QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC.dna.json
(HC) Installed DNA from /run/user/1000/happ-bundle-YQPvkn/QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC.dna.json as "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC"
WS call: admin/dna/install_from_file
request ------> (object)
{
"id": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"path": "/run/user/1000/happ-bundle-YQPvkn/QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC.dna.json",
"copy": true,
"expected_hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC"
}
response <----- (object)
{
"success": true,
"dna_hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC"
}
Installing UI (by copying from temp dir): { hash: 'FAKEHASH',
path: '/run/user/1000/happ-bundle-YQPvkn/FAKEHASH' } /home/vagrant/.holochain/holo/ui-store/QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K
Installation successful!
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "provider",
"function": "get_app_details",
"args": {
"app_hash": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
}
response <----- (object)
{
"Ok": {
"app_bundle": {
"happ_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
},
"payment_pref": []
}
}
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "happ-store",
"zome": "happs",
"function": "get_app",
"args": {
"app_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
}
}
response <----- (object)
{
"Ok": {
"address": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu",
"appEntry": {
"title": "TODO",
"author": "Envoy Host",
"description": "TODO",
"thumbnailUrl": "TODO.gif",
"homepageUrl": "TODO.com",
"dnas": [
{
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat.dna.json",
"hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"handle": "basic-chat-handle"
}
],
"ui": {
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat-0.0.4.zip",
"hash": "FAKEHASH",
"handle": null
}
},
"upvotes": 0,
"upvotedByMe": false
}
}
WS call: admin/instance/list
request ------> (object)
{}
response <----- (object)
[
{
"id": "holo-hosting-app",
"dna": "holo-hosting-app",
"agent": "host-agent"
},
{
"id": "happ-store",
"dna": "happ-store",
"agent": "host-agent"
},
{
"id": "holofuel",
"dna": "holofuel",
"agent": "host-agent"
}
]
(HC) Reading DNA from /run/user/1000/holo-envoy/test-storage-u0nkgL/dna/QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC.dna.json
(HC) Failed to load instance QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC from storage: ErrorGeneric("State could not be loaded due to NoneError")
Initializing new chain...
(HC) <E> WARNING! The git-hash of the runtime and the zome don't match.
Runtime hash: 2ece132a3fe12bd9e3475fe8e79de327950db597
Zome hash: 3b42375dc31442b62855cff8c339a6422c447176
WS call: admin/instance/add
request ------> (object)
{
"id": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"agent_id": "host-agent",
"dna_id": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC"
}
response <----- (object)
{
"success": true
}
(HC) Stopping interface public-interface
(HC) Starting interface 'public-interface'.
WS call: admin/interface/add_instance
request ------> (object)
{
"instance_id": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"interface_id": "public-interface"
}
response <----- (object)
{
"success": true
}
(HC) Starting instance "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC"...
WS call: admin/instance/start
request ------> (object)
{
"id": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC"
}
response <----- (object)
{
"success": true
}
Instance setup successful!
WS call: admin/dna/list
request ------> (object)
{}
response <----- (object)
[
{
"id": "holo-hosting-app",
"hash": null
},
{
"id": "happ-store",
"hash": null
},
{
"id": "holofuel",
"hash": null
},
{
"id": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC"
}
]
(HC) Reading DNA from /home/vagrant/envoy/src/config/.envoy-deps/servicelogger.dna.json
(HC) Installed DNA from /home/vagrant/envoy/src/config/.envoy-deps/servicelogger.dna.json as "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
WS call: admin/dna/install_from_file
request ------> (object)
{
"id": "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K",
"path": "/home/vagrant/envoy/src/config/.envoy-deps/servicelogger.dna.json",
"copy": true,
"properties": {
"forApp": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
}
response <----- (object)
{
"success": true,
"dna_hash": "QmWWKVtXdh9uyVaSf1W9YsHagmF9sFbna1nxeXKarmpCPP"
}
WS call: admin/instance/list
request ------> (object)
{}
response <----- (object)
[
{
"id": "holo-hosting-app",
"dna": "holo-hosting-app",
"agent": "host-agent"
},
{
"id": "happ-store",
"dna": "happ-store",
"agent": "host-agent"
},
{
"id": "holofuel",
"dna": "holofuel",
"agent": "host-agent"
},
{
"id": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"dna": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"agent": "host-agent"
}
]
(HC) Reading DNA from /run/user/1000/holo-envoy/test-storage-u0nkgL/dna/QmWWKVtXdh9uyVaSf1W9YsHagmF9sFbna1nxeXKarmpCPP.dna.json
(HC) Failed to load instance servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K from storage: ErrorGeneric("State could not be loaded due to NoneError")
Initializing new chain...
(HC) <E> WARNING! The git-hash of the runtime and the zome don't match.
Runtime hash: 2ece132a3fe12bd9e3475fe8e79de327950db597
Zome hash: 6f20397185401b7e0f4356d5096c990524c999b7
WS call: admin/instance/add
request ------> (object)
{
"id": "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K",
"agent_id": "host-agent",
"dna_id": "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
response <----- (object)
{
"success": true
}
(HC) Stopping interface internal-interface
Starting interface 'internal-interface'.
WS call: admin/interface/add_instance
request ------> (object)
{
"instance_id": "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K",
"interface_id": "internal-interface"
}
response <----- (object)
{
"success": true
}
(HC) Starting instance "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"...
WS call: admin/instance/start
request ------> (object)
{
"id": "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
response <----- (object)
{
"success": true
}
WS call: admin/bridge/list
request ------> (object)
{}
response <----- (object)
[]
(HC) Added bridge from 'servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K' to 'holofuel' as 'holofuel-bridge'
WS call: admin/bridge/add
request ------> (object)
{
"handle": "holofuel-bridge",
"caller_id": "servicelogger-QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K",
"callee_id": "holofuel"
}
response <----- (object)
{
"success": true
}
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with [HashString("QmdhwVq3BsYFsmEZmrWZZXqvFezzXBrio5wGDgrpgghpMp")]
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([String("QmdhwVq3BsYFsmEZmrWZZXqvFezzXBrio5wGDgrpgghpMp")])]
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), target: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), link_type: "host_enabled", tag: "" }
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), target: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), link_type: "apps_enabled", tag: "" }
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), target: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), link_type: "recently_disabled_app_tag", tag: "" }
(HC) debug/reduce/link_meta: Publishing link meta for link: Link { base: HashString("QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"), target: HashString("HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz"), link_type: "recently_enabled_app_tag", tag: "" }
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "host",
"function": "enable_app",
"args": {
"app_hash": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
}
response <----- (object)
{
"Ok": null
}
enabled happ QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K: null
holo/call input: { happId: 'QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K',
agentId: 'some-random-agent-id',
handle: 'basic-chat',
zome: 'chat',
function: 'register',
args: { name: 'chat noir', avatar_url: null },
signature: 'TODO' }
looking up happId, handle: QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K basic-chat
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "provider",
"function": "get_app_details",
"args": {
"app_hash": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
}
response <----- (object)
{
"Ok": {
"app_bundle": {
"happ_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
},
"payment_pref": []
}
}
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "happ-store",
"zome": "happs",
"function": "get_app",
"args": {
"app_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
}
}
response <----- (object)
{
"Ok": {
"address": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu",
"appEntry": {
"title": "TODO",
"author": "Envoy Host",
"description": "TODO",
"thumbnailUrl": "TODO.gif",
"homepageUrl": "TODO.com",
"dnas": [
{
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat.dna.json",
"hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"handle": "basic-chat-handle"
}
],
"ui": {
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat-0.0.4.zip",
"hash": "FAKEHASH",
"handle": null
}
},
"upvotes": 0,
"upvotedByMe": false
}
}
envoy server request failure: Error: DNA not found for appHash 'QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu' and handle 'basic-chat'
at Object.<anonymous> (/home/vagrant/envoy/src/flows/install-happ.ts:286:11)
at Generator.next (<anonymous>)
at fulfilled (/home/vagrant/envoy/src/flows/install-happ.ts:4:58)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
WS call: holo/call
request ------> (object)
{
"happId": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K",
"agentId": "some-random-agent-id",
"handle": "basic-chat",
"zome": "chat",
"function": "register",
"args": {
"name": "chat noir",
"avatar_url": null
},
"signature": "TODO"
}
response <----- (object)
{}
holo/call input: { happId: 'QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K',
agentId: 'some-random-agent-id',
handle: 'basic-chat',
zome: 'chat',
function: 'get_all_public_streams',
args: {},
signature: 'TODO' }
looking up happId, handle: QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K basic-chat
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "holo-hosting-app",
"zome": "provider",
"function": "get_app_details",
"args": {
"app_hash": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K"
}
}
response <----- (object)
{
"Ok": {
"app_bundle": {
"happ_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
},
"payment_pref": []
}
}
(HC) debug/reduce/get_links: Responding to GET LINKS request from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz with []
(HC) debug/reduce/handle_get_links_result: Got response from HcSCJI6DoRv3qxzmxpC3G944OW35I7rekX8t9fYvHtOpoijfys87hfa5BD6mnyz: [Array([])]
WS call: call
request ------> (object)
{
"instance_id": "happ-store",
"zome": "happs",
"function": "get_app",
"args": {
"app_hash": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu"
}
}
response <----- (object)
{
"Ok": {
"address": "QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu",
"appEntry": {
"title": "TODO",
"author": "Envoy Host",
"description": "TODO",
"thumbnailUrl": "TODO.gif",
"homepageUrl": "TODO.com",
"dnas": [
{
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat.dna.json",
"hash": "QmW5tVmqmgHQVxi3JtpQtpHHmDXn7W7qBrhSeArskR7ULC",
"handle": "basic-chat-handle"
}
],
"ui": {
"location": "https://github.com/holochain/holochain-basic-chat/releases/download/v0.0.4/holochain-basic-chat-0.0.4.zip",
"hash": "FAKEHASH",
"handle": null
}
},
"upvotes": 0,
"upvotedByMe": false
}
}
envoy server request failure: Error: DNA not found for appHash 'QmdtTKV9G8r3sG7FUXdMD65GhGVT8akREqJWL9giiaTEYu' and handle 'basic-chat'
at Object.<anonymous> (/home/vagrant/envoy/src/flows/install-happ.ts:286:11)
at Generator.next (<anonymous>)
at fulfilled (/home/vagrant/envoy/src/flows/install-happ.ts:4:58)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
WS call: holo/call
request ------> (object)
{
"happId": "QmPXNfaJAzkn1UAcNxdJgERaKYTvVWM5gUkGYTv3Do8n7K",
"agentId": "some-random-agent-id",
"handle": "basic-chat",
"zome": "chat",
"function": "get_all_public_streams",
"args": {},
"signature": "TODO"
}
response <----- (object)
{}
ok 1 should be truthy
ok 2 should be equivalent
Shutting down everything...
Closing client: master
Closing client: public
Closing client: internal
# all components shut themselves down properly
Connection lost, stopping...
Shut down wss
Shut down httpServer
Shut down adminServer
Shut down wormholeServer
Conductor closed with code: null
Serving all UIs from: /home/vagrant/.holochain/holo/ui-store
# rpc event sanity check
ok 3 should be equal
ok 4 should be equal
ok 5 should be equal
1..5
# tests 5
# pass 5
# ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment