Skip to content

Commit

Permalink
improved tests
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Koehn <brad@koehn.com>
  • Loading branch information
Brad Koehn committed Jan 31, 2020
1 parent 47da136 commit 39a5751
Show file tree
Hide file tree
Showing 340 changed files with 46,152 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/restic/exec_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ func Test_getSummaryLine(t *testing.T) {

func Test_getLastLine(t *testing.T) {
tests := []struct {
output string
output []byte
want string
}{
{`last line
`, "last line"},
{`first line
{[]byte(`last line
`), "last line"},
{[]byte(`first line
second line
third line
`, "third line"},
{"", ""},
`), "third line"},
{[]byte(""), ""},
{nil, ""},
}
for _, tt := range tests {
t.Run(tt.want, func(t *testing.T) {
assert.Equal(t, []byte(tt.want), getLastLine([]byte(tt.output)))
})
}
assert.Equal(t, []byte(""), getLastLine(nil))
}

func Test_getVolumeSize(t *testing.T) {
Expand Down
201 changes: 201 additions & 0 deletions vendor/github.com/vmware-tanzu/velero/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39a5751

Please sign in to comment.