Skip to content

Commit 707be4c

Browse files
committed
fix test
1 parent 3eba78f commit 707be4c

File tree

1 file changed

+5
-4
lines changed
  • crates/icp-cli/src/commands

1 file changed

+5
-4
lines changed

crates/icp-cli/src/commands/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,15 +590,16 @@ mod context_tests {
590590

591591
#[tokio::test]
592592
async fn test_get_agent_for_env_network_not_configured() {
593-
// Environment exists in project but its network not configured in MockNetworkAccessor
593+
// Environment "dev" exists in project and uses "local" network,
594+
// but "local" network is not configured in MockNetworkAccessor
594595
let ctx = Context {
595596
project: Arc::new(MockProjectLoader::complex()),
596597
// MockNetworkAccessor has no networks configured
597598
..Context::mocked()
598599
};
599600

600601
let result = ctx
601-
.get_agent_for_env(&IdentitySelection::Anonymous, "nonexistent")
602+
.get_agent_for_env(&IdentitySelection::Anonymous, "dev")
602603
.await;
603604

604605
assert!(matches!(
@@ -654,15 +655,15 @@ mod context_tests {
654655

655656
#[tokio::test]
656657
async fn test_get_agent_for_network_not_configured() {
657-
// Network exists in project but not configured in MockNetworkAccessor
658+
// Network "local" exists in project but is not configured in MockNetworkAccessor
658659
let ctx = Context {
659660
project: Arc::new(MockProjectLoader::complex()),
660661
// MockNetworkAccessor has no networks configured
661662
..Context::mocked()
662663
};
663664

664665
let result = ctx
665-
.get_agent_for_network(&IdentitySelection::Anonymous, "nonexistent")
666+
.get_agent_for_network(&IdentitySelection::Anonymous, "local")
666667
.await;
667668

668669
assert!(matches!(

0 commit comments

Comments
 (0)