TestMain setup the defaultMask used by some test functions.
(m *testing.M)
| 26 | |
| 27 | // TestMain setup the defaultMask used by some test functions. |
| 28 | func TestMain(m *testing.M) { |
| 29 | fm, err := fieldmaskpb.New(&flowpb.Flow{}, defaults.FieldMask...) |
| 30 | if err != nil { |
| 31 | panic(fmt.Errorf("failed to construct field mask: %w", err)) |
| 32 | } |
| 33 | defaultMask = fm |
| 34 | code := m.Run() |
| 35 | os.Exit(code) |
| 36 | } |
| 37 | |
| 38 | func TestEventTypes(t *testing.T) { |
| 39 | // Make sure to keep event type slices in sync. Agent and debug |