mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-27 20:56:44 +00:00
Fix more windows tests
This commit is contained in:
@@ -448,11 +448,8 @@ func TestSSHClient_PortForwardingDataTransfer(t *testing.T) {
|
||||
func getCurrentUsername() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
if currentUser, err := user.Current(); err == nil {
|
||||
username := currentUser.Username
|
||||
if idx := strings.LastIndex(username, "\\"); idx != -1 {
|
||||
username = username[idx+1:]
|
||||
}
|
||||
return strings.ToLower(username)
|
||||
// On Windows, return the full domain\username for proper authentication
|
||||
return currentUser.Username
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user