mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix test
This commit is contained in:
parent
19b6a16003
commit
cd7ce720c7
|
@ -5,6 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||||
"github.com/chrislusf/seaweedfs/weed/storage/types"
|
"github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -54,7 +55,10 @@ func TestAppend(t *testing.T) {
|
||||||
os.Remove(tempFile.Name())
|
os.Remove(tempFile.Name())
|
||||||
}()
|
}()
|
||||||
|
|
||||||
offset, _, _, _ := n.Append(tempFile, CurrentVersion)
|
datBackend := backend.NewDiskFile(tempFile.Name(), tempFile)
|
||||||
|
defer datBackend.Close()
|
||||||
|
|
||||||
|
offset, _, _, _ := n.Append(datBackend, CurrentVersion)
|
||||||
if offset != uint64(fileSize) {
|
if offset != uint64(fileSize) {
|
||||||
t.Errorf("Fail to Append Needle.")
|
t.Errorf("Fail to Append Needle.")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue