bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/cmd/scollector/collectors/disk_linux_test.go (about)

     1  package collectors
     2  
     3  import "testing"
     4  
     5  func TestFilterVolumes(t *testing.T) {
     6  	in := []string{"/dev/zero", "/etc/passwd"}
     7  	out := []string{"/dev/zero"}
     8  	got := filterVolumes(in)
     9  	if !compTab(got, out) {
    10  		t.Fatalf("filterVolume: got: %v, expected: %v", got, out)
    11  	}
    12  }