MCPcopy Create free account
hub / github.com/AdRoll/baker / fillComponentsAndLoadConfig

Function fillComponentsAndLoadConfig

user_config_test.go:13–33  ·  view source on GitHub ↗
(t *testing.T, toml string, user ...baker.UserDesc)

Source from the content-addressed store, hash-verified

11)
12
13func fillComponentsAndLoadConfig(t *testing.T, toml string, user ...baker.UserDesc) (*baker.Config, error) {
14 t.Helper()
15
16 const base = `
17[fields]
18names=["f0", "f1", "f2", "f3"]
19
20[input]
21name="random"
22
23[output]
24name="recorder"
25`
26 comp := baker.Components{
27 Inputs: []baker.InputDesc{inputtest.RandomDesc},
28 Outputs: []baker.OutputDesc{outputtest.RecorderDesc},
29 User: user,
30 }
31
32 return baker.NewConfigFromToml(strings.NewReader(base+toml), comp)
33}
34
35func TestUserConfigSimple(t *testing.T) {
36 // This test checks that a single user configuration is correctly decoded.

Callers 4

TestUserConfigSimpleFunction · 0.85
TestUserConfigMultipleFunction · 0.85

Calls 1

NewConfigFromTomlFunction · 0.92

Tested by

no test coverage detected