mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-11 07:26:37 +00:00
dhcp: add dhcp scope stats (#1840)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
24
internal/headers/dhcpsapi/dhcpsapi_test.go
Normal file
24
internal/headers/dhcpsapi/dhcpsapi_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package dhcpsapi
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
func TestGetDHCPV4ScopeStatistics(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if procDhcpGetSuperScopeInfoV4.Find() != nil {
|
||||
t.Skip("DhcpGetSuperScopeInfoV4 is not available")
|
||||
}
|
||||
|
||||
_, err := GetDHCPV4ScopeStatistics()
|
||||
if errors.Is(err, windows.Errno(1753)) {
|
||||
t.Skip(err.Error())
|
||||
}
|
||||
|
||||
require.NoError(t, err)
|
||||
}
|
||||
Reference in New Issue
Block a user