MCPcopy Index your code
hub / github.com/rilldata/rill / TestComplete

Function TestComplete

runtime/parser/parser_test.go:144–416  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

142}
143
144func TestComplete(t *testing.T) {
145 files := map[string]string{
146 // rill.yaml
147 `rill.yaml`: ``,
148 // init.sql
149 `init.sql`: `
150{{ configure "max_version" 2 }}
151INSTALL 'hello';
152`,
153 // source s1
154 `sources/s1.yaml`: `
155connector: s3
156path: hello
157`,
158 // source s2
159 `sources/s2.sql`: `
160-- @connector: postgres
161-- @refresh.cron: 0 0 * * *
162SELECT 1
163`,
164 // model m1
165 `models/m1.sql`: `
166SELECT 1
167`,
168 // model m2
169 `models/m2.sql`: `
170SELECT * FROM m1
171`,
172 `models/m2.yaml`: `
173materialize: true
174`,
175 // dashboard d1
176 `metrics/d1.yaml`: `
177version: 1
178type: metrics_view
179model: m2
180dimensions:
181 - name: a
182 column: a
183measures:
184 - name: b
185 expression: count(*)
186 format_d3: "0,0"
187 format_d3_locale:
188 currency: ["£", ""]
189first_day_of_week: 7
190first_month_of_year: 3
191`,
192 // explore e1
193 `explores/e1.yaml`: `
194type: explore
195display_name: E1
196metrics_view: d1
197measures:
198 - b
199time_ranges:
200 - P2W
201 - range: P4W

Callers

nothing calls this directly

Calls 4

makeRepoFunction · 0.85
mustFunction · 0.70
ParseFunction · 0.70

Tested by

no test coverage detected