MCPcopy Index your code
hub / github.com/coder/coder / requireFieldValue

Function requireFieldValue

coderd/x/chatd/chatd_internal_test.go:3065–3074  ·  view source on GitHub ↗

requireFieldValue asserts that a SinkEntry contains a field with the given name and value.

(t *testing.T, entry slog.SinkEntry, name string, expected interface{})

Source from the content-addressed store, hash-verified

3063// requireFieldValue asserts that a SinkEntry contains a field with
3064// the given name and value.
3065func requireFieldValue(t *testing.T, entry slog.SinkEntry, name string, expected interface{}) {
3066 t.Helper()
3067 for _, f := range entry.Fields {
3068 if f.Name == name {
3069 require.Equal(t, expected, f.Value, "field %q value mismatch", name)
3070 return
3071 }
3072 }
3073 t.Fatalf("field %q not found in log entry", name)
3074}
3075
3076func TestSkillsFromParts(t *testing.T) {
3077 t.Parallel()

Calls 3

HelperMethod · 0.65
EqualMethod · 0.45
FatalfMethod · 0.45

Tested by

no test coverage detected