@@ -75,13 +75,13 @@ impl Default for Config {
7575 fn default ( ) -> Self {
7676 let mut aliases = HashMap :: new ( ) ;
7777 aliases. insert (
78- "cloud " . to_string ( ) ,
78+ "default " . to_string ( ) ,
7979 AliasConfig :: api ( DEFAULT_API_URL , None , false ) ,
8080 ) ;
8181
8282 Self {
8383 version : 1 ,
84- default : Some ( "cloud " . to_string ( ) ) ,
84+ default : Some ( "default " . to_string ( ) ) ,
8585 aliases,
8686 }
8787 }
@@ -232,13 +232,13 @@ mod tests {
232232 let config = Config :: default ( ) ;
233233
234234 assert_eq ! ( config. version, 1 ) ;
235- assert_eq ! ( config. default , Some ( "cloud " . to_string( ) ) ) ;
236- assert ! ( config. aliases. contains_key( "cloud " ) ) ;
235+ assert_eq ! ( config. default , Some ( "default " . to_string( ) ) ) ;
236+ assert ! ( config. aliases. contains_key( "default " ) ) ;
237237
238- let cloud = config. aliases . get ( "cloud " ) . unwrap ( ) ;
239- assert_eq ! ( cloud . type_name( ) , "api" ) ;
238+ let default = config. aliases . get ( "default " ) . unwrap ( ) ;
239+ assert_eq ! ( default . type_name( ) , "api" ) ;
240240
241- if let AliasConfig :: Api { url, token, .. } = cloud {
241+ if let AliasConfig :: Api { url, token, .. } = default {
242242 assert_eq ! ( url, DEFAULT_API_URL ) ;
243243 assert ! ( token. is_none( ) ) ;
244244 }
@@ -248,7 +248,7 @@ mod tests {
248248 fn test_get_alias ( ) {
249249 let config = Config :: default ( ) ;
250250
251- assert ! ( config. get_alias( "cloud " ) . is_some( ) ) ;
251+ assert ! ( config. get_alias( "default " ) . is_some( ) ) ;
252252 assert ! ( config. get_alias( "nonexistent" ) . is_none( ) ) ;
253253 }
254254
@@ -271,7 +271,7 @@ mod tests {
271271 let mut config = Config :: default ( ) ;
272272
273273 let result = config. set_alias (
274- "cloud " ,
274+ "default " ,
275275 AliasConfig :: api ( "https://other.com" , None , false ) ,
276276 false ,
277277 ) ;
@@ -284,11 +284,11 @@ mod tests {
284284 let mut config = Config :: default ( ) ;
285285 let new_url = "https://new.example.com" ;
286286
287- let result = config. set_alias ( "cloud " , AliasConfig :: api ( new_url, None , false ) , true ) ;
287+ let result = config. set_alias ( "default " , AliasConfig :: api ( new_url, None , false ) , true ) ;
288288
289289 assert ! ( result. is_ok( ) ) ;
290290
291- if let AliasConfig :: Api { url, .. } = config. aliases . get ( "cloud " ) . unwrap ( ) {
291+ if let AliasConfig :: Api { url, .. } = config. aliases . get ( "default " ) . unwrap ( ) {
292292 assert_eq ! ( url, new_url) ;
293293 }
294294 }
@@ -319,9 +319,9 @@ mod tests {
319319 fn test_remove_alias_clears_default ( ) {
320320 let mut config = Config :: default ( ) ;
321321
322- assert_eq ! ( config. default , Some ( "cloud " . to_string( ) ) ) ;
322+ assert_eq ! ( config. default , Some ( "default " . to_string( ) ) ) ;
323323
324- config. remove_alias ( "cloud " ) . unwrap ( ) ;
324+ config. remove_alias ( "default " ) . unwrap ( ) ;
325325
326326 assert ! ( config. default . is_none( ) ) ;
327327 }
@@ -396,8 +396,8 @@ mod tests {
396396 let parsed: Config = serde_json:: from_str ( & json) . unwrap ( ) ;
397397
398398 assert_eq ! ( parsed. version, 1 ) ;
399- assert_eq ! ( parsed. default , Some ( "cloud " . to_string( ) ) ) ;
400- assert ! ( parsed. aliases. contains_key( "cloud " ) ) ;
399+ assert_eq ! ( parsed. default , Some ( "default " . to_string( ) ) ) ;
400+ assert ! ( parsed. aliases. contains_key( "default " ) ) ;
401401 assert ! ( parsed. aliases. contains_key( "infra" ) ) ;
402402 }
403403
0 commit comments