(t *testing.T)
| 25 | ) |
| 26 | |
| 27 | func TestPlugin(t *testing.T) { |
| 28 | zero := int64(0) |
| 29 | for _, ft := range []filetypes.FormatType{ |
| 30 | filetypes.FormatTypeCSV, |
| 31 | filetypes.FormatTypeJSON, |
| 32 | filetypes.FormatTypeParquet, |
| 33 | } { |
| 34 | s := spec.Spec{ |
| 35 | Bucket: bucket, |
| 36 | Region: region, |
| 37 | Path: t.TempDir()[1:], |
| 38 | NoRotate: true, |
| 39 | BatchSizeBytes: &zero, |
| 40 | BatchSize: &zero, |
| 41 | FileSpec: filetypes.FileSpec{Format: ft}, |
| 42 | } |
| 43 | |
| 44 | t.Run("generic/"+string(ft), func(t *testing.T) { |
| 45 | t.Parallel() |
| 46 | testPlugin(t, &s) |
| 47 | }) |
| 48 | |
| 49 | t.Run("write/"+string(ft), func(t *testing.T) { |
| 50 | t.Parallel() |
| 51 | testPluginCustom(t, &s) |
| 52 | }) |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | func testPlugin(t *testing.T, s *spec.Spec) { |
| 57 | ctx := context.Background() |
nothing calls this directly
no test coverage detected