userprofile_windows_test.go 531 B

123456789101112131415161718192021222324
  1. // Copyright (c) Tailscale Inc & AUTHORS
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. package winutil
  4. import (
  5. "testing"
  6. "golang.org/x/sys/windows"
  7. )
  8. func TestGetRoamingProfilePath(t *testing.T) {
  9. token := windows.GetCurrentProcessToken()
  10. computerName, userName, err := getComputerAndUserName(token, nil)
  11. if err != nil {
  12. t.Fatal(err)
  13. }
  14. if _, err := getRoamingProfilePath(t.Logf, token, computerName, userName); err != nil {
  15. t.Error(err)
  16. }
  17. // TODO(aaron): Flesh out better once can run tests under domain accounts.
  18. }