Skip to content

Commit

Permalink
chore: allow TestState without constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
wangeguo committed May 7, 2024
1 parent 9338b9e commit 4db84b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions workflow/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub trait State<T>: Send + Sync {
}

#[cfg(test)]

mod tests {
use crate::Intent;

Expand All @@ -32,10 +33,11 @@ mod tests {
use async_trait::async_trait;
use kube::runtime::controller::Action;

#[allow(dead_code)]
struct TestState;

#[test]
fn test_impl_state_trait() {
struct TestState {}

#[async_trait]
impl State<()> for TestState {
async fn handle(&self, _ctx: &Context<()>) -> Option<Intent<()>> {
Expand Down

0 comments on commit 4db84b3

Please sign in to comment.