Skip to content

Commit

Permalink
Merge pull request #66 from Finomnis/improve_coverage_2
Browse files Browse the repository at this point in the history
Improve code coverage
  • Loading branch information
Finomnis authored Oct 21, 2023
2 parents 992ce4a + b43de10 commit c8722d7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![License](https://img.shields.io/crates/l/tokio-graceful-shutdown)](https://github.com/Finomnis/tokio-graceful-shutdown/blob/main/LICENSE-MIT)
[![Build Status](https://img.shields.io/github/actions/workflow/status/Finomnis/tokio-graceful-shutdown/ci.yml?branch=main)](https://github.com/Finomnis/tokio-graceful-shutdown/actions/workflows/ci.yml?query=branch%3Amain)
[![docs.rs](https://img.shields.io/docsrs/tokio-graceful-shutdown)](https://docs.rs/tokio-graceful-shutdown)
[![Coverage Status](https://img.shields.io/codecov/c/github/Finomnis/tokio-graceful-shutdown)](https://app.codecov.io/github/Finomnis/tokio-graceful-shutdown/tree/main)
[![Coverage Status](https://img.shields.io/codecov/c/github/Finomnis/tokio-graceful-shutdown)](https://app.codecov.io/github/Finomnis/tokio-graceful-shutdown)

This crate provides utility functions to perform a graceful shutdown on tokio-rs based services.

Expand Down
3 changes: 3 additions & 0 deletions src/error_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ pub enum ErrorAction {
/// Do not forward the error to the parent subsystem.
CatchAndLocalShutdown,
}

#[cfg(test)]
mod tests;
12 changes: 12 additions & 0 deletions src/error_action/tests.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//Clone, Copy, Debug, Eq, PartialEq

use super::*;

#[test]
fn derives() {
let a = ErrorAction::Forward;
let b = ErrorAction::CatchAndLocalShutdown;

assert_ne!(a, b.clone());
assert_ne!(format!("{:?}", a), format!("{:?}", b));
}

0 comments on commit c8722d7

Please sign in to comment.