File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -995,7 +995,7 @@ func (d *Driver) SendSignal(sig os.Signal) error {
995995
996996// trimMacAddress trimming "0" of the ten's digit
997997func trimMacAddress (rawUUID string ) string {
998- re := regexp .MustCompile (`[0] ([A-Fa-f0-9][:] )` )
998+ re := regexp .MustCompile (`0 ([A-Fa-f0-9](:|$) )` )
999999 mac := re .ReplaceAllString (rawUUID , "$1" )
10001000
10011001 return mac
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ func TestDefaultSSHUsername(t *testing.T) {
2929func TestTrimMacAddress (t * testing.T ) {
3030 // test MAC address 02:f0:0d:60:0f:30 and reverse
3131 testMacAddress := trimMacAddress ("02:f0:0d:60:01:03" )
32- newMacAddress := "2:f0:d:60:1:03 "
32+ newMacAddress := "2:f0:d:60:1:3 "
3333
3434 if ! assert .Equal (t , testMacAddress , newMacAddress ) {
3535 t .Fatalf ("expected different MacAddress \n source %s\n received %s" , testMacAddress , newMacAddress )
You can’t perform that action at this time.
0 commit comments