You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine/capture/capture_test.go

25 lines
438 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
package capture
import "testing"
func TestNew(t *testing.T) {
c := New()
if c == nil {
t.Fatal("New() returned nil")
}
}
func TestCapture_Start(t *testing.T) {
c := New()
defer c.Close()
// Basic test - should not panic
err := c.Start("test.pcap")
if err != nil {
t.Logf("Start returned error (expected on some platforms): %v", err)
}
}