mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
25 lines
422 B
Go
25 lines
422 B
Go
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)
|
|
}
|