#[test]
fn a_source_not_signed_in_says_what_to_run() {
let source = crate::cloud::cloud_sources::Source {
id: "az".to_string(),
label: "Azure".to_string(),
kind: crate::cloud::source::ProviderKind::Azure,
tier: crate::cloud::cloud_sources::Tier::Tools,
origin: "not signed in".to_string(),
s3: Default::default(),
azure: Default::default(),
project: None,
profile: None,
buckets: Vec::new(),
problem: Some("not signed in: run az login".to_string()),
gcloud: None,
secret_command: None,
google_credentials: None,
};
let row = crate::home::home_app::home_cloud_source(&source, None, false);
assert_eq!(row.count_text(), "not signed in");
assert_eq!(row.note, "run az login");
let source = crate::cloud::cloud_sources::Source {
problem: Some("no credentials in AWS_PROFILE".to_string()),
origin: "env".to_string(),
..source
};
let row = crate::home::home_app::home_cloud_source(&source, None, false);
assert_eq!(row.count_text(), "not configured");
assert_eq!(row.note, "no credentials in AWS_PROFILE");
}