Skip to content

Commit

Permalink
zfs: Add test for creation property
Browse files Browse the repository at this point in the history
  • Loading branch information
timaebi authored and mmlb committed Apr 1, 2022
1 parent 82ca81a commit 8f8b2ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"runtime"
"strings"
"testing"

zfs "github.com/mistifyio/go-zfs/v3"
Expand Down Expand Up @@ -38,6 +39,13 @@ func TestDatasetGetProperty(t *testing.T) {
prop, err = ds.GetProperty("compression")
ok(t, err)
equals(t, "off", prop)

// creation should be a time stamp with spaces in it
prop, err = ds.GetProperty("creation")
ok(t, err)
if len(strings.Fields(prop)) != 5 {
t.Errorf("expected a string with spaces in it, got: %v", prop)
}
}

func TestSnapshots(t *testing.T) {
Expand Down

0 comments on commit 8f8b2ca

Please sign in to comment.