@@ -64,15 +64,15 @@ Host 10.200.1.46
6464 assert .Equal (t , "~/.ssh/keys/work_rsa" , prodHost .IdentityFile )
6565 // Verify prodHost inherited port 2222 from wildcard Host *
6666 assert .Equal (t , "2222" , prodHost .ResolvedProperties ["Port" ])
67- assert .Equal (t , "yes" , prodHost .ResolvedProperties ["ForwardAgent" ])
67+ assert .Equal (t , "yes" , prodHost .ResolvedProperties [keyForwardAgent ])
6868
6969 // Verify dbHost does not have alias (its alias is the IP itself)
7070 assert .NotNil (t , dbHost )
7171 assert .Equal (t , "10.200.1.46" , dbHost .Alias )
7272 // dbHost should inherit User, Port, and ForwardAgent from wildcard
7373 assert .Equal (t , "default_user" , dbHost .User )
7474 assert .Equal (t , "2222" , dbHost .Port )
75- assert .Equal (t , "yes" , dbHost .ResolvedProperties ["ForwardAgent" ])
75+ assert .Equal (t , "yes" , dbHost .ResolvedProperties [keyForwardAgent ])
7676}
7777
7878// TestManagerIncludes tests glob inclusion and recursive parsing.
@@ -130,7 +130,7 @@ Host my-host
130130 User : "admin" ,
131131 Port : "22" ,
132132 Properties : map [string ]string {
133- "ForwardAgent" : "yes" ,
133+ keyForwardAgent : "yes" ,
134134 },
135135 }
136136 err = mgr .AddHost (primaryPath , newHost )
@@ -153,7 +153,7 @@ Host my-host
153153 assert .Equal (t , "192.168.1.10" , addedHost .Name )
154154 assert .Equal (t , "admin" , addedHost .User )
155155 assert .Equal (t , "22" , addedHost .Port )
156- assert .Equal (t , "yes" , addedHost .Properties ["ForwardAgent" ])
156+ assert .Equal (t , "yes" , addedHost .Properties [keyForwardAgent ])
157157
158158 // 2. Update host
159159 updatedHost := & Host {
@@ -162,8 +162,8 @@ Host my-host
162162 User : "root" ,
163163 Port : "222" ,
164164 Properties : map [string ]string {
165- "ForwardAgent" : "no" ,
166- "ProxyJump" : "jump-box" ,
165+ keyForwardAgent : "no" ,
166+ "ProxyJump" : "jump-box" ,
167167 },
168168 }
169169 err = mgr2 .UpdateHost ("added-host" , updatedHost )
@@ -186,7 +186,7 @@ Host my-host
186186 assert .Equal (t , "192.168.1.15" , foundUpdated .Name )
187187 assert .Equal (t , "root" , foundUpdated .User )
188188 assert .Equal (t , "222" , foundUpdated .Port )
189- assert .Equal (t , "no" , foundUpdated .Properties ["ForwardAgent" ])
189+ assert .Equal (t , "no" , foundUpdated .Properties [keyForwardAgent ])
190190 assert .Equal (t , "jump-box" , foundUpdated .Properties ["ProxyJump" ])
191191
192192 // 3. Delete host
0 commit comments