Skip to content

Commit

Permalink
check that valid names are also valid hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Oct 10, 2024
1 parent b740ac3 commit e5d6ce7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3173,6 +3173,9 @@ mod test {
for name in valid_names {
eprintln!("check name \"{}\" (should be valid)", name);
assert_eq!(name, name.parse::<Name>().unwrap().as_str());
// make sure valid names are also valid hostnames so we can use names as
// fallback hostnames, e.g., in instance create
assert_eq!(name, name.parse::<Hostname>().unwrap().as_str());
}
}

Expand Down

0 comments on commit e5d6ce7

Please sign in to comment.