(t *testing.T, ctx context.Context, zoneId string, name string, val byte, expected int)
| 289 | } |
| 290 | |
| 291 | func checkFileByteCount(t *testing.T, ctx context.Context, zoneId string, name string, val byte, expected int) { |
| 292 | _, rdata, err := WFS.ReadFile(ctx, zoneId, name) |
| 293 | if err != nil { |
| 294 | t.Errorf("error reading data for file %q: %v", name, err) |
| 295 | return |
| 296 | } |
| 297 | var count int |
| 298 | for _, b := range rdata { |
| 299 | if b == val { |
| 300 | count++ |
| 301 | } |
| 302 | } |
| 303 | if count != expected { |
| 304 | t.Errorf("byte count mismatch for file %q: expected %d, got %d", name, expected, count) |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | func checkFileDataAt(t *testing.T, ctx context.Context, zoneId string, name string, offset int64, data string) { |
| 309 | _, rdata, err := WFS.ReadAt(ctx, zoneId, name, offset, int64(len(data))) |
no test coverage detected