mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-03 15:47:38 -04:00
Update tests; run fuzzing (#294)
Run fuzzing tests in CI. Use race detector when running tests. Add missing `t.Helper()` calls. Update test helpers in `pkg/bindfilter` to use `RtlGetNtVersionNumbers` instead of reading registry, and skip tests if not running as admin. Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
)
|
||||
|
||||
func mustNewV4(t *testing.T) GUID {
|
||||
t.Helper()
|
||||
|
||||
g, err := NewV4()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -15,6 +17,8 @@ func mustNewV4(t *testing.T) GUID {
|
||||
}
|
||||
|
||||
func mustNewV5(t *testing.T, namespace GUID, name []byte) GUID {
|
||||
t.Helper()
|
||||
|
||||
g, err := NewV5(namespace, name)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -23,6 +27,8 @@ func mustNewV5(t *testing.T, namespace GUID, name []byte) GUID {
|
||||
}
|
||||
|
||||
func mustFromString(t *testing.T, s string) GUID {
|
||||
t.Helper()
|
||||
|
||||
g, err := FromString(s)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user