logon: BREAKING: replace wmi query by Win32 API calls and expose detailed logon sessions. (click PR for more information) (#1687)

This commit is contained in:
Jan-Otto Kröpke
2024-10-13 10:19:41 +02:00
committed by GitHub
parent 7500ad6a83
commit d1517d8398
6 changed files with 323 additions and 181 deletions

View File

@@ -0,0 +1,16 @@
package secur32_test
import (
"testing"
"github.com/prometheus-community/windows_exporter/internal/headers/secur32"
"github.com/stretchr/testify/require"
)
func TestGetLogonSessions(t *testing.T) {
t.Parallel()
sessionData, err := secur32.GetLogonSessions()
require.NoError(t, err)
require.NotEmpty(t, sessionData)
}