Add depot, attendant, jetfire, optimus, ota services with kustomize overlays
This commit is contained in:
30
services/depot/handlers/hmi_init_test.go
Normal file
30
services/depot/handlers/hmi_init_test.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package handlers_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/fiskerinc/cloud-services/services/depot/handlers"
|
||||
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
"github.com/fiskerinc/cloud-services/pkg/testhelper"
|
||||
)
|
||||
|
||||
func TestHMIInit(t *testing.T) {
|
||||
setupRedisMock()
|
||||
setupDBMock()
|
||||
|
||||
id := "FISKER123"
|
||||
sessionData := common.HMISessionData{
|
||||
SessionID: "XXXXX",
|
||||
}
|
||||
data, err := json.Marshal(sessionData)
|
||||
if err != nil {
|
||||
t.Errorf(testhelper.TestErrorTemplate, "TestHMIInit", nil, err)
|
||||
}
|
||||
|
||||
err = handlers.HMIInit(mockDB, id, data)
|
||||
if err != nil {
|
||||
t.Errorf(testhelper.TestErrorTemplate, "TestHMIInit", nil, err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user