MCPcopy Create free account
hub / github.com/brimdata/super / FromYAMLFile

Function FromYAMLFile

ztest/ztest.go:310–330  ·  view source on GitHub ↗

FromYAMLFile loads ztests from the named YAML file.

(name string)

Source from the content-addressed store, hash-verified

308
309// FromYAMLFile loads ztests from the named YAML file.
310func FromYAMLFile(name string) ([]*ZTest, error) {
311 f, err := yamlparser.ParseFile(name, 0)
312 if err != nil {
313 return nil, err
314 }
315 var zs []*ZTest
316 for _, d := range f.Docs {
317 var z ZTest
318 if err := yaml.NodeToValue(d.Body, &z, yaml.DisallowUnknownField()); err != nil {
319 return nil, err
320 }
321 if s := d.Start; s != nil {
322 // s is a YAML directives end marker ("---").
323 z.Line = s.Position.Line + 1
324 } else {
325 z.Line = 1
326 }
327 zs = append(zs, &z)
328 }
329 return zs, nil
330}
331
332func (z *ZTest) ShouldSkip(path string) string {
333 switch {

Callers 2

searchForSuperSQLFunction · 0.92
LoadFunction · 0.85

Calls

no outgoing calls

Tested by 1

searchForSuperSQLFunction · 0.74