Skip to content

Commit

Permalink
change param secret to optional in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erratic-pattern committed Oct 25, 2023
1 parent a94519c commit 64c0e54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/harness/src/output/parameter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct Param {
pub name: String,
pub value: String,
pub raw: Option<String>,
pub secret: String,
pub secret: Option<String>,
#[serde(rename = "Modified At")]
pub modified_at: Option<String>,
#[serde(rename = "Created At")]
Expand Down
8 changes: 4 additions & 4 deletions tests/test_parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,12 @@ fn test_parameters_generate() {
.find_by_name("param1")
.expect("param1 not found in JSON");
assert_eq!(param1.value.len(), 12);
assert_eq!(param1.secret, "false");
assert_eq!(param1.secret.as_deref(), Some("false"));
let param2 = params
.find_by_name("param2")
.expect("param1 not found in JSON");
assert_eq!(param2.value.len(), 12);
assert_eq!(param2.secret, "true");
assert_eq!(param2.secret.as_deref(), Some("true"));
assert_ne!(param1.value, param2.value);
/* Check that values were not shown during generation */
cmd1.stdout(not(contains(&param1.value)));
Expand Down Expand Up @@ -514,12 +514,12 @@ fn test_parameters_generate() {
.find_by_name("param1")
.expect("param1 not found in JSON");
assert_eq!(param1_updated.value.len(), 12);
assert_eq!(param1_updated.secret, "false");
assert_eq!(param1_updated.secret.as_deref(), Some("false"));
let param2_updated = params_updated
.find_by_name("param2")
.expect("param1 not found in JSON");
assert_eq!(param2_updated.value.len(), 12);
assert_eq!(param2_updated.secret, "true");
assert_eq!(param2_updated.secret.as_deref(), Some("true"));

/* Make sure updated values are different from original */
assert_ne!(param1.value, param1_updated.value);
Expand Down

0 comments on commit 64c0e54

Please sign in to comment.