(t *testing.T, toml string, user ...baker.UserDesc)
| 11 | ) |
| 12 | |
| 13 | func fillComponentsAndLoadConfig(t *testing.T, toml string, user ...baker.UserDesc) (*baker.Config, error) { |
| 14 | t.Helper() |
| 15 | |
| 16 | const base = ` |
| 17 | [fields] |
| 18 | names=["f0", "f1", "f2", "f3"] |
| 19 | |
| 20 | [input] |
| 21 | name="random" |
| 22 | |
| 23 | [output] |
| 24 | name="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 | |
| 35 | func TestUserConfigSimple(t *testing.T) { |
| 36 | // This test checks that a single user configuration is correctly decoded. |
no test coverage detected