Skip to content

Commit 7bdc065

Browse files
committed
basic fixes, can build, tests pass
1 parent dc74cc9 commit 7bdc065

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/database/environments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl Environments {
228228
name: env_name.to_string(),
229229
description: description.map(String::from),
230230
parent: Some(parent_url.to_string()),
231-
copy_rbac: copy_rbac,
231+
copy_rbac: Some(copy_rbac.unwrap_or(false)),
232232
};
233233
let response = environments_create(rest_cfg, new_env);
234234
match response {

src/database/parameters.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,14 @@ impl Parameters {
587587
external_filter: jmes_path.map(|v| v.to_string()),
588588
interpolated: evaluated,
589589
};
590-
let response =
591-
projects_parameters_values_create(
592-
rest_cfg,
593-
param_id,
594-
proj_id,
595-
value_create,
596-
None,
597-
None,
598-
);
590+
let response = projects_parameters_values_create(
591+
rest_cfg,
592+
param_id,
593+
proj_id,
594+
value_create,
595+
None,
596+
None,
597+
);
599598
match response {
600599
Ok(api_value) => Ok(api_value.id),
601600
Err(ResponseError(ref content)) => match content.status.as_u16() {

src/database/user_details.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ mod test {
182182

183183
#[test]
184184
fn service_account_null_last_used_by() {
185-
let data = r#"{"count":1,"next":null,"previous":null,"results":[{"url":"https://api.staging.cloudtruth.io/api/v1/serviceaccounts/auth0%7C61949e36c0baff006a6d1aea/","id":"auth0|61949e36c0baff006a6d1aea","user":{"url":"https://api.staging.cloudtruth.io/api/v1/users/auth0%7C61949e36c0baff006a6d1aea/","id":"auth0|61949e36c0baff006a6d1aea","type":"service","name":"test-user-name-Linux-37","email":"serviceaccount+ajwflw8wzpc1quhp@cloudtruth.com","picture_url":null,"created_at":"2021-11-17T06:16:24.082794Z","modified_at":"2021-11-17T06:16:24.548713Z"},"description":"Description on create","created_at":"2021-11-17T06:16:24.558748Z","modified_at":"2021-11-17T06:16:24.558748Z","last_used_at":null}]}"#;
185+
let data = r#"{"count":1,"next":null,"previous":null,"results":[{"url":"https://api.staging.cloudtruth.io/api/v1/serviceaccounts/auth0%7C61949e36c0baff006a6d1aea/","id":"auth0|61949e36c0baff006a6d1aea","user":{"url":"https://api.staging.cloudtruth.io/api/v1/users/auth0%7C61949e36c0baff006a6d1aea/","id":"auth0|61949e36c0baff006a6d1aea","type":"service","name":"test-user-name-Linux-37","email":"serviceaccount+ajwflw8wzpc1quhp@cloudtruth.com","chatgpt_threads":{},"picture_url":null,"created_at":"2021-11-17T06:16:24.082794Z","modified_at":"2021-11-17T06:16:24.548713Z"},"description":"Description on create","keys":[],"created_at":"2021-11-17T06:16:24.558748Z","modified_at":"2021-11-17T06:16:24.558748Z","last_used_at":null}]}"#;
186186
let result: serde_json::Result<PaginatedServiceAccountList> = serde_json::from_str(data);
187187
print!("{:?}", result); // ## TODO: remove
188188
assert!(result.is_ok());

0 commit comments

Comments
 (0)