summaryrefslogtreecommitdiffhomepage
path: root/util/winutil/userprofile_windows_test.go
blob: 0a21cea6ac10f1f8c99dd3ed7821a7b20a58cd3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause

package winutil

import (
	"testing"

	"golang.org/x/sys/windows"
)

func TestGetRoamingProfilePath(t *testing.T) {
	token := windows.GetCurrentProcessToken()
	computerName, userName, err := getComputerAndUserName(token, nil)
	if err != nil {
		t.Fatal(err)
	}

	if _, err := getRoamingProfilePath(t.Logf, token, computerName, userName); err != nil {
		t.Error(err)
	}

	// TODO(aaron): Flesh out better once can run tests under domain accounts.
}