mirror of
https://github.com/zrepl/zrepl.git
synced 2025-08-15 09:32:25 +02:00
move implementation to internal/
directory (#828)
This commit is contained in:
committed by
GitHub
parent
b9b9ad10cf
commit
908807bd59
23
internal/pruning/keep_helpers_test.go
Normal file
23
internal/pruning/keep_helpers_test.go
Normal file
@ -0,0 +1,23 @@
|
||||
package pruning
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestShallowCopySnapList(t *testing.T) {
|
||||
|
||||
l1 := []Snapshot{
|
||||
stubSnap{name: "foo"},
|
||||
stubSnap{name: "bar"},
|
||||
}
|
||||
l2 := shallowCopySnapList(l1)
|
||||
|
||||
assert.Equal(t, l1, l2)
|
||||
|
||||
l1[0] = stubSnap{name: "baz"}
|
||||
assert.Equal(t, "baz", l1[0].Name())
|
||||
assert.Equal(t, "foo", l2[0].Name())
|
||||
|
||||
}
|
Reference in New Issue
Block a user