22 lines
381 B
Go
22 lines
381 B
Go
package cmd_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"git.gentoo.party/sam/thanks/internal/cmd"
|
|
)
|
|
|
|
func Test_ZCommand(t *testing.T) {
|
|
localRunner := &cmd.ZRunner{
|
|
Prog: "/bin/sh",
|
|
Args: []string{"-c"},
|
|
}
|
|
|
|
zfsList := "zfs list %s"
|
|
out, err := localRunner.Run(context.TODO(), zfsList, "zroot")
|
|
if err != nil {
|
|
t.Errorf("localRunner failed: %s\n\n%s", err.Error(), out)
|
|
}
|
|
}
|