Skip to content

Commit

Permalink
test: be explicit about policy type expectation in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Sestito <[email protected]>
  • Loading branch information
fabriziosestito committed Oct 25, 2023
1 parent 850d362 commit 57f8365
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/policy_artifacthub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ fn parse_annotations(
#[cfg(test)]
mod tests {
use super::*;
use crate::policy_metadata::ContextAwareResource;
use crate::policy_metadata::{ContextAwareResource, PolicyType};
use assert_json_diff::assert_json_eq;
use serde_json::json;
use std::collections::{HashMap, HashSet};
Expand Down Expand Up @@ -509,7 +509,7 @@ mod tests {
background_audit: true,
context_aware_resources: HashSet::new(),
execution_mode: Default::default(),
policy_type: Default::default(),
policy_type: PolicyType::Kubernetes,
minimum_kubewarden_version: None,
}
}
Expand Down
1 change: 1 addition & 0 deletions src/policy_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ mod tests {
annotations: None,
background_audit: true,
context_aware_resources: HashSet::new(),
policy_type: PolicyType::Kubernetes,
..Default::default()
};

Expand Down

0 comments on commit 57f8365

Please sign in to comment.