mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Implement AWS region aliases (#646)
This commit is contained in:
committed by
Matan Kushner
parent
f3784f5aaa
commit
256a2be949
@@ -28,6 +28,21 @@ fn region_set() -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn region_set_with_alias() -> io::Result<()> {
|
||||
let output = common::render_module("aws")
|
||||
.env("AWS_REGION", "ap-southeast-2")
|
||||
.use_config(toml::toml! {
|
||||
[aws.region_aliases]
|
||||
ap-southeast-2 = "au"
|
||||
})
|
||||
.output()?;
|
||||
let expected = format!("on {} ", Color::Yellow.bold().paint("☁️ au"));
|
||||
let actual = String::from_utf8(output.stdout).unwrap();
|
||||
assert_eq!(expected, actual);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_region_set() -> io::Result<()> {
|
||||
let output = common::render_module("aws")
|
||||
|
||||
Reference in New Issue
Block a user