Skip to content

Commit

Permalink
fix(tests): Add Default to Realm struct in keycloak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flo-ride committed Nov 30, 2024
1 parent 53538fe commit 894874b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/utils/containers/keycloak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,32 @@ pub struct Realm {
pub users: Vec<User>,
}

impl Default for Realm {
fn default() -> Self {
Self {
name: "realm_test".to_string(),
clients: vec![Client::default()],
users: vec![
User {
username: "admin".to_string(),
email: "[email protected]".to_string(),
..Default::default()
},
User {
username: "user_1".to_string(),
email: "[email protected]".to_string(),
..Default::default()
},
User {
username: "user_2".to_string(),
email: "[email protected]".to_string(),
..Default::default()
},
],
}
}
}

#[derive(Clone)]
pub struct Client {
pub client_id: String,
Expand Down

0 comments on commit 894874b

Please sign in to comment.