Skip to content

Commit

Permalink
Don't stop
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Jan 1, 2025
1 parent c5d6923 commit 9061de1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ jobs:
run: |
touch ./static/index.html
- name: Run cargo test
env:
GH_ACTION: true
run: cargo test

6 changes: 4 additions & 2 deletions src/auth_middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,10 @@ mod test {
#[cfg(test)]
#[ctor::dtor]
fn stop() {
if let Ok(mut container) = CONTAINER.write() {
*container = None
if std::env::var("GH_ACTION").is_err() {
if let Ok(mut container) = CONTAINER.write() {
*container = None
}
}
}

Expand Down

0 comments on commit 9061de1

Please sign in to comment.