Refactor kafka to pure Go (franz-go), fix DBC stubs, update Dockerfile

This commit is contained in:
Chris Rai
2026-01-31 00:05:47 -05:00
parent fbb820d7b3
commit b5bec57dfa
776 changed files with 18945 additions and 2052 deletions

27
pkg/can-go/frame_test.go Normal file
View File

@@ -0,0 +1,27 @@
package can
import (
"fmt"
"testing"
"unsafe"
"gotest.tools/v3/assert"
)
// If this mocks ever starts failing, the documentation needs to be updated
// to prefer pass-by-pointer over pass-by-value.
func TestFrame_Size(t *testing.T) {
assert.Assert(t, unsafe.Sizeof(Frame{}) <= 16, "Frame size is <= 16 bytes")
}
func TestFrame_Validate_Error(t *testing.T) {
for _, tt := range []Frame{
{ID: MaxID + 1},
{ID: MaxExtendedID + 1, IsExtended: true},
} {
tt := tt
t.Run(fmt.Sprintf("%v", tt), func(t *testing.T) {
assert.Check(t, tt.Validate() != nil, "should return validation error")
})
}
}