Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 22, 2024
1 parent 5c20c0e commit 5f6e632
Showing 1 changed file with 35 additions and 50 deletions.
85 changes: 35 additions & 50 deletions ic-task-scheduler/tests/pocket_ic_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,72 +49,57 @@ impl PocketIcTestContext {

pub async fn scheduled_state_called(&self) -> bool {
let args = Encode!(&()).unwrap();
let res = self
.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"scheduled_state_called",
args,
)
.await;

res
self.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"scheduled_state_called",
args,
)
.await
}

pub async fn completed_tasks(&self) -> Vec<u32> {
let args = Encode!(&()).unwrap();
let res = self
.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"completed_tasks",
args,
)
.await;

res
self.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"completed_tasks",
args,
)
.await
}

pub async fn panicked_tasks(&self) -> Vec<u32> {
let args = Encode!(&()).unwrap();
let res = self
.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"panicked_tasks",
args,
)
.await;

res
self.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"panicked_tasks",
args,
)
.await
}

pub async fn failed_tasks(&self) -> Vec<u32> {
let args = Encode!(&()).unwrap();
let res = self
.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"failed_tasks",
args,
)
.await;

res
self.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"failed_tasks",
args,
)
.await
}

pub async fn executed_tasks(&self) -> Vec<u32> {
let args = Encode!(&()).unwrap();
let res = self
.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"executed_tasks",
args,
)
.await;

res
self.query_as(
ic::caller(),
self.dummy_scheduler_canister,
"executed_tasks",
args,
)
.await
}

pub async fn run_scheduler(&self) {
Expand Down

0 comments on commit 5f6e632

Please sign in to comment.