up
Some checks failed
Go CI / test (push) Has been cancelled

This commit is contained in:
Dev
2025-09-13 12:30:01 +03:00
commit 4d51c65060
14 changed files with 1227 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package fingerprint
import "testing"
// TestFingerprint_Basic ensures the Fingerprint function executes without error
// and returns a Result with the default OS placeholder.
func TestFingerprint_Basic(t *testing.T) {
res, err := Fingerprint("127.0.0.1")
if err != nil {
t.Fatalf("Fingerprint returned error: %v", err)
}
if res == nil {
t.Fatalf("Fingerprint returned nil result")
}
if res.OS != "Unknown" {
t.Fatalf("Expected OS to be 'Unknown', got %s", res.OS)
}
// The test does not require any open ports; an empty OpenPorts slice is acceptable.
}