Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

31
pkg/cache/car_dtcs_test.go vendored Normal file
View File

@@ -0,0 +1,31 @@
package cache_test
import (
"testing"
m "fiskerinc.com/modules/common"
"fiskerinc.com/modules/cache"
"github.com/stretchr/testify/assert"
)
var (
dtc = m.DTC_ECU{
VIN: "3FAFP13P71R199432",
ECU: "ACU",
TroubleCode: 8388881,
}
)
func TestSetAndExists(t *testing.T) {
carDtcCache := cache.NewCarDTCsCache(1000)
exists := carDtcCache.Exists(dtc)
assert.Equal(t, exists, false)
carDtcCache.Set(dtc)
exists = carDtcCache.Exists(dtc)
assert.Equal(t, exists, true)
}