Add depot, attendant, jetfire, optimus, ota services with kustomize overlays
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package handlers_test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"otaupdate/handlers"
|
||||
"otaupdate/services"
|
||||
"testing"
|
||||
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
mo "github.com/fiskerinc/cloud-services/pkg/db/queries/mocks"
|
||||
th "github.com/fiskerinc/cloud-services/pkg/testhelper"
|
||||
)
|
||||
|
||||
func TestHandleUpdateManifestSUMSAdd(t *testing.T) {
|
||||
mock := mo.MockUpdateManifestVersions{}
|
||||
services.GetDB().SetUpdateManifestVersions(&mock)
|
||||
|
||||
tests := []mo.DBHttpTest{
|
||||
{
|
||||
Name: "Good data",
|
||||
Request: th.MakeTestRequest(http.MethodPost, "/manifests/sums", common.SUMSVersionCreate{
|
||||
SUMSVersions: []common.SUMSVersion{
|
||||
{
|
||||
Version: "5236.12.50.67",
|
||||
},
|
||||
{
|
||||
Version: "5236.12.50.68",
|
||||
},
|
||||
}}),
|
||||
ExpectedStatus: http.StatusOK,
|
||||
ExpectedResponse: `[{"version":"5236.12.50.67","os_version":""},{"version":"5236.12.50.68","os_version":""}]`,
|
||||
},
|
||||
}
|
||||
|
||||
mo.RunDBTests(t, tests, handlers.HandleUpdateManifestSUMSAdd, &mock)
|
||||
}
|
||||
Reference in New Issue
Block a user