[#321] platformtest: minimal integration tests for package replication

# Conflicts:
#	platformtest/tests/generated_cases.go
This commit is contained in:
Christian Schwarz
2020-05-24 18:18:02 +02:00
parent 82370f3555
commit 28e1c486f5
4 changed files with 220 additions and 4 deletions
+4 -2
View File
@@ -454,7 +454,7 @@ func (s *SendStream) killAndWait(precedingReadErr error) error {
WaitErr: exitErr,
}
} else {
s.opErr = fmt.Errorf("zfs send exited with status code 0")
s.opErr = precedingReadErr
}
// detect the edge where we're called from s.Read
@@ -1014,7 +1014,9 @@ func ZFSRecv(ctx context.Context, fs string, v *ZFSSendArgVersion, stream io.Rea
snaps, err := ZFSListFilesystemVersions(ctx, fsdp, ListFilesystemVersionsOptions{
Types: Snapshots,
})
if err != nil {
if _, ok := err.(*DatasetDoesNotExist); ok {
snaps = []FilesystemVersion{}
} else if err != nil {
return fmt.Errorf("cannot list versions for rollback for forced receive: %s", err)
}
sort.Slice(snaps, func(i, j int) bool {