MCPcopy Create free account
hub / github.com/araddon/qlbridge / Setup

Method Setup

datasource/files/filesource_test.go:52–70  ·  view source on GitHub ↗

Setup the filesource with schema info

(s *schema.Schema)

Source from the content-addressed store, hash-verified

50
51// Setup the filesource with schema info
52func (m *testSource) Setup(s *schema.Schema) error {
53
54 fileStore := "localfs"
55 if os.Getenv("FILESTORE") != "" {
56 fileStore = os.Getenv("FILESTORE")
57 }
58
59 settings := u.JsonHelper(map[string]interface{}{
60 "path": "baseball",
61 "filetype": "csv",
62 "type": fileStore,
63 })
64 s.Conf = &schema.ConfigSource{
65 Name: "testcsvs",
66 SourceType: "testcsvs",
67 Settings: settings,
68 }
69 return m.FileSource.Setup(s)
70}
71
72func TestFileList(t *testing.T) {
73 testutil.TestSqlSelect(t, "testcsvs", `show databases;`,

Callers

nothing calls this directly

Calls 1

SetupMethod · 0.65

Tested by

no test coverage detected