tailscale/posture/serialnumber_notmacos_test.go
Brad Fitzpatrick 2690b4762f Revert "VERSION.txt: this is v1.78.0"
This reverts commit 0267fe83b200f1702a2fa0a395442c02a053fadb.

Reason: it converted the tree to Windows line endings.

Updates #14299

Change-Id: I2271a61d43e99bd0bbcf9f4831e8783e570ba08a
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-12-05 15:27:16 -08:00

39 lines
893 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
// Build on Windows, Linux and *BSD
//go:build windows || (linux && !android) || freebsd || openbsd || dragonfly || netbsd
package posture
import (
"fmt"
"testing"
"tailscale.com/types/logger"
)
func TestGetSerialNumberNotMac(t *testing.T) {
// This test is intentionally skipped as it will
// require root on Linux to get access to the serials.
// The test case is intended for local testing.
// Comment out skip for local testing.
t.Skip()
sns, err := GetSerialNumbers(logger.Discard)
if err != nil {
t.Fatalf("failed to get serial number: %s", err)
}
if len(sns) == 0 {
t.Fatalf("expected at least one serial number, got %v", sns)
}
if len(sns[0]) <= 0 {
t.Errorf("expected a serial number with more than zero characters, got %s", sns[0])
}
fmt.Printf("serials: %v\n", sns)
}