(t *testing.T)
| 185 | } |
| 186 | |
| 187 | func TestBackupExt4Vhdx_EmptyBasePathReturnsError(t *testing.T) { |
| 188 | t.Parallel() |
| 189 | |
| 190 | reg := wsllib.MockWslReg{ |
| 191 | GetProfileFromNameFunc: func(name string) (wsllib.Profile, error) { |
| 192 | return wsllib.Profile{BasePath: ""}, nil |
| 193 | }, |
| 194 | } |
| 195 | |
| 196 | err := backupExt4Vhdx(reg, "Arch", "backup.ext4.vhdx") |
| 197 | if err == nil { |
| 198 | t.Fatal("backupExt4Vhdx succeeded unexpectedly") |
| 199 | } |
| 200 | if err.Error() != "get profile failed" { |
| 201 | t.Fatalf("error = %q, want %q", err.Error(), "get profile failed") |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | func TestBackupExt4Vhdx_CopiesPlainFile(t *testing.T) { |
| 206 | t.Parallel() |
nothing calls this directly
no test coverage detected