Skip to content

Commit

Permalink
Tests passing again
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Apr 29, 2024
1 parent 0ef5ce9 commit f12b9ac
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 40 deletions.
7 changes: 3 additions & 4 deletions crates/coordinator/tests/create_and_get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::BTreeMap;

use hc_zome_profiles_integrity::*;
use hdk::prelude::*;
use holochain::test_utils::consistency_10s;
use holochain::{conductor::config::ConductorConfig, sweettest::*};

#[tokio::test(flavor = "multi_thread")]
Expand Down Expand Up @@ -41,7 +40,7 @@ async fn create_and_get() {
.call(&alice_zome, "create_profile", profile)
.await;

consistency_10s([&alice, &bobbo]).await;
await_consistency(30, [&alice, &bobbo]).await.unwrap();

let record_2: Option<Record> = conductors[0]
.call(&alice_zome, "get_agent_profile", alice_pub_key)
Expand All @@ -65,7 +64,7 @@ async fn create_and_get() {
.call(&alice_zome, "update_profile", profile.clone())
.await;

consistency_10s([&alice, &bobbo]).await;
await_consistency(30, [&alice, &bobbo]).await.unwrap();

// ---> get it over the DHT though get_agent_profile()
let alices_profile: Option<Record> = conductors[1]
Expand Down Expand Up @@ -111,7 +110,7 @@ async fn create_and_get() {
)
.await;

let all_agents: Vec<AgentPubKey> = conductors[1]
let all_agents: Vec<Link> = conductors[1]
.call(&bob_zome, "get_agents_with_profile", ())
.await;

Expand Down
3 changes: 1 addition & 2 deletions crates/coordinator/tests/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::BTreeMap;

use hc_zome_profiles_integrity::*;
use holochain::prelude::{AgentPubKey, Record};
use holochain::test_utils::consistency_10s;
use holochain::{conductor::config::ConductorConfig, sweettest::*};

#[tokio::test(flavor = "multi_thread")]
Expand Down Expand Up @@ -42,7 +41,7 @@ async fn create_and_get() {
)
.await;

consistency_10s([&alice, &bobbo]).await;
await_consistency(30, [&alice, &bobbo]).await.unwrap();

let agents_searched: Vec<AgentPubKey> = conductors[1]
.call(&bob_zome, "search_agents", String::from("ali"))
Expand Down
54 changes: 27 additions & 27 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"start": "AGENTS=2 npm run network",
"network": "hc s clean && npm run build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run local-services\" \"npm run launch\" \"holochain-playground\"",
"test": "npm run build:happ && nix flake check && npm test -w tests",
"test": "npm run build:happ && nix flake check -L && npm test -w tests",
"launch": "echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/profiles-test.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:$BOOTSTRAP_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT",
"local-services": "hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT",
"build:happ": "npm run build:zome && hc app pack workdir --recursive",
Expand Down
2 changes: 1 addition & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@msgpack/msgpack": "^2.8.0",
"@holochain/client": "^0.17.0-dev.12",
"@holochain/tryorama": "^0.16.0-dev.5",
"@holochain/tryorama": "^0.16.0-dev.6",
"@holochain-open-dev/signals": "^0.300.0-dev.5",
"@holochain-open-dev/utils": "^0.300.0-dev.2",
"typescript": "^4.9.4",
Expand Down
2 changes: 1 addition & 1 deletion tests/src/profile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test("create Profile", async () => {
assert.equal(agentsWithProfile.length, 1);

const profileStatus = alice.store.myProfile$.get();
assert.equal(profileStatus.status, "complete");
assert.equal(profileStatus.status, "completed");
assert.ok((profileStatus as any).value);
});
});

0 comments on commit f12b9ac

Please sign in to comment.