Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Wójcik committed Jan 3, 2025
1 parent 1cf32a6 commit 00cad1d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/enterprise/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ impl Counts {

#[cfg(test)]
mod test {
use std::u32;

use chrono::{TimeDelta, Utc};

use crate::enterprise::license::{set_cached_license, License, LicenseLimits};
Expand Down
3 changes: 2 additions & 1 deletion tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ pub async fn make_base_client(
let failed_logins = FailedLoginMap::new();
let failed_logins = Arc::new(Mutex::new(failed_logins));

let license = License::new_with_default_limits(
let license = License::new(
"test_customer".to_string(),
false,
// Permanent license
None,
None,
);

set_cached_license(Some(license));
Expand Down
3 changes: 2 additions & 1 deletion tests/openid_login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ async fn test_openid_providers() {
assert!(redirect_uri.is_some());

// Test that the endpoint is forbidden when the license is expired
let new_license = License::new_with_default_limits(
let new_license = License::new(
"test".to_string(),
false,
Some(Utc::now() - Duration::days(1)),
None,
);
set_cached_license(Some(new_license));
let response = client.get("/api/v1/openid/auth_info").send().await;
Expand Down

0 comments on commit 00cad1d

Please sign in to comment.