MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / testSpecs

Function testSpecs

plugins/destination/file/client/client_test.go:77–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func testSpecs(t *testing.T) []testSpec {
78 var ret []testSpec
79 formats := testFormats()
80 for _, s := range testSpecsWithoutFormat() {
81 s := s
82 s.NoRotate = true
83 for i := range formats {
84 s2 := s
85 s2.testName += ":" + string(formats[i].Format)
86 s2.FileSpec = formats[i]
87 ret = append(ret, s2)
88
89 if formats[i].Format != filetypes.FormatTypeParquet {
90 s2.testName += ":gzip"
91 fs := s2.FileSpec
92 fs.Compression = filetypes.CompressionTypeGZip
93 s2.FileSpec = fs
94 ret = append(ret, s2)
95 }
96 }
97 }
98
99 for i := range ret {
100 bd := t.TempDir()
101 ret[i].baseDir = bd
102 ret[i].Spec.Path = filepath.Join(bd, ret[i].Spec.Path)
103 }
104
105 return ret
106}
107
108func TestPlugin(t *testing.T) {
109 syncAfterWrite = true // turn on sync after write and wait before read

Callers 1

TestPluginFunction · 0.85

Calls 2

testFormatsFunction · 0.85
testSpecsWithoutFormatFunction · 0.85

Tested by

no test coverage detected