mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-06 02:26:36 +00:00
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:
16
internal/headers/secur32/secur32_test.go
Normal file
16
internal/headers/secur32/secur32_test.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user