Skip to content

add some additional checks to avoid false positives with existing VIN #1584

add some additional checks to avoid false positives with existing VIN

add some additional checks to avoid false positives with existing VIN #1584

Triggered via pull request January 23, 2025 01:58
Status Failure
Total duration 3m 42s
Artifacts

test.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

11 errors and 2 warnings
tests: internal/middleware/owner/owner_test.go#L117
owner_test.go:117: Error Trace: /home/runner/work/devices-api/devices-api/internal/middleware/owner/owner_test.go:117 Error: Not equal: expected: 200 actual : 404 Test: TestUserDeviceOwnerMiddleware/user-owners-ud ---
tests: internal/middleware/owner/owner_test.go#L248
owner_test.go:248: user does not have a valid ethereum address {"level":"info","app":"devices-api","userId":"louxUser","serial":"4a12c37b-b662-4fad-68e6-7e74f9ce658c","time":"2025-01-23T02:01:38Z","message":"Omega croggers."} owner_test.go:251: Error Trace: /home/runner/work/devices-api/devices-api/internal/middleware/owner/owner_test.go:251 Error: Not equal: expected: 403 actual : 200 Test: TestAutoPiOwnerMiddleware/user_does_not_have_a_valid_ethereum_address ---
tests: internal/middleware/owner/owner_test.go#L248
owner_test.go:248: user is not owner of paired vehicle or AftermarketDevice {"level":"info","app":"devices-api","userId":"louxUser","serial":"4a12c37b-b662-4fad-68e6-7e74f9ce658c","time":"2025-01-23T02:01:38Z","message":"Omega croggers."} owner_test.go:251: Error Trace: /home/runner/work/devices-api/devices-api/internal/middleware/owner/owner_test.go:251 Error: Not equal: expected: 403 actual : 200 Test: TestAutoPiOwnerMiddleware/user_is_not_owner_of_paired_vehicle_or_AftermarketDevice ---
tests: internal/controllers/geofences_controller_test.go#L202
geofences_controller_test.go:202: Error Trace: /home/runner/work/devices-api/devices-api/internal/controllers/geofences_controller_test.go:202 Error: Not equal: expected: 201 actual : 400 Test: TestGeofencesControllerTestSuite/TestPostGeofenceRespectsWallet ---
tests: internal/controllers/synthetic_devices_controller_test.go#L155
synthetic_devices_controller_test.go:155: Error Trace: /home/runner/work/devices-api/devices-api/internal/controllers/synthetic_devices_controller_test.go:155 Error: Not equal: expected: 200 actual : 401 Test: TestSyntheticDevicesControllerTestSuite/TestGetSyntheticDeviceMintingPayload
tests: internal/controllers/synthetic_devices_controller_test.go#L157
synthetic_devices_controller_test.go:157: Error Trace: /home/runner/work/devices-api/devices-api/internal/controllers/synthetic_devices_controller_test.go:157 Error: Not equal: expected: map[string]interface {}{"code":401, "message":"User's address 0x0000000000000000000000000000000000000000 does not match vehicle owner 0xbdd37CAF357aCB594126734B4f5fadd2d5bCf8f5."} actual : map[string]interface {}{"domain":map[string]interface {}{"chainId":"0x13881", "name":"DIMO", "salt":"", "verifyingContract":"0x4De1bCf2B7E851E31216fC07989caA902A604784", "version":"1"}, "message":map[string]interface {}{"integrationNode":"0xa", "vehicleNode":"0x39"}, "primaryType":"MintSyntheticDeviceSign", "types":map[string]interface {}{"EIP712Domain":[]interface {}{map[string]interface {}{"name":"name", "type":"string"}, map[string]interface {}{"name":"version", "type":"string"}, map[string]interface {}{"name":"chainId", "type":"uint256"}, map[string]interface {}{"name":"verifyingContract", "type":"address"}}, "MintSyntheticDeviceSign":[]interface {}{map[string]interface {}{"name":"integrationNode", "type":"uint256"}, map[string]interface {}{"name":"vehicleNode", "type":"uint256"}}}} Diff: --- Expected +++ Actual @@ -1,4 +1,44 @@ -(map[string]interface {}) (len=2) { - (string) (len=4) "code": (float64) 401, - (string) (len=7) "message": (string) (len=130) "User's address 0x0000000000000000000000000000000000000000 does not match vehicle owner 0xbdd37CAF357aCB594126734B4f5fadd2d5bCf8f5." +(map[string]interface {}) (len=4) { + (string) (len=6) "domain": (map[string]interface {}) (len=5) { + (string) (len=7) "chainId": (string) (len=7) "0x13881", + (string) (len=4) "name": (string) (len=4) "DIMO", + (string) (len=4) "salt": (string) "", + (string) (len=17) "verifyingContract": (string) (len=42) "0x4De1bCf2B7E851E31216fC07989caA902A604784", + (string) (len=7) "version": (string) (len=1) "1" + }, + (string) (len=7) "message": (map[string]interface {}) (len=2) { + (string) (len=15) "integrationNode": (string) (len=3) "0xa", + (string) (len=11) "vehicleNode": (string) (len=4) "0x39" + }, + (string) (len=11) "primaryType": (string) (len=23) "MintSyntheticDeviceSign", + (string) (len=5) "types": (map[string]interface {}) (len=2) { + (string) (len=12) "EIP712Domain": ([]interface {}) (len=4) { + (map[string]interface {}) (len=2) { + (string) (len=4) "name": (string) (len=4) "name", + (string) (len=4) "type": (string) (len=6) "string" + }, + (map[string]interface {}) (len=2) { + (string) (len=4) "name": (string) (len=7) "version", + (string) (len=4) "type": (string) (len=6) "string" + }, + (map[string]interface {}) (len=2) { + (string) (len=4) "name": (string) (len=7) "chainId", + (string) (len=4) "type": (string) (len=7) "uint256" + }, + (map[string]interface {}) (len=2) { + (string) (len=4) "name": (string) (len=17) "verifyingContract", + (string) (len=4) "type": (string) (len=7) "address" + } + }, + (string) (len=23) "MintSyntheticDeviceSign": ([]interface {}) (len=2) { + (map[string]interface {}) (len=2) {
tests: internal/controllers/synthetic_devices_controller_test.go#L403
synthetic_devices_controller_test.go:403: Error Trace: /home/runner/work/devices-api/devices-api/internal/controllers/synthetic_devices_controller_test.go:403 Error: Not equal: expected: 424 actual : 404 Test: TestSyntheticDevicesControllerTestSuite/TestGetSyntheticDeviceMintingPayload_FailToMintKia
tests: internal/controllers/synthetic_devices_controller_test.go#L411
synthetic_devices_controller_test.go:411: Error Trace: /home/runner/work/devices-api/devices-api/internal/controllers/synthetic_devices_controller_test.go:411 Error: Not equal: expected: "Kia vehicles connected via smartcar cannot be manually minted." actual : "No vehicle with that id found." Diff: --- Expected +++ Actual @@ -1 +1 @@ -Kia vehicles connected via smartcar cannot be manually minted. +No vehicle with that id found. Test: TestSyntheticDevicesControllerTestSuite/TestGetSyntheticDeviceMintingPayload_FailToMintKia
tests: internal/controllers/synthetic_devices_controller_test.go#L236
synthetic_devices_controller_test.go:236: Error Trace: /home/runner/work/devices-api/devices-api/internal/controllers/synthetic_devices_controller_test.go:236 Error: Not equal: expected: 500 actual : 404 Test: TestSyntheticDevicesControllerTestSuite/TestGetSyntheticDeviceMintingPayload_GetIntegrationFailed
tests: internal/controllers/synthetic_devices_controller_test.go#L237
synthetic_devices_controller_test.go:237: Error Trace: /home/runner/work/devices-api/devices-api/internal/controllers/synthetic_devices_controller_test.go:237 Error: Not equal: expected: map[string]interface {}{"code":500, "message":"could not find integration"} actual : map[string]interface {}{"code":404, "message":"No vehicle with that id found."} Diff: --- Expected +++ Actual @@ -1,4 +1,4 @@ (map[string]interface {}) (len=2) { - (string) (len=4) "code": (float64) 500, - (string) (len=7) "message": (string) (len=26) "could not find integration" + (string) (len=4) "code": (float64) 404, + (string) (len=7) "message": (string) (len=30) "No vehicle with that id found." } Test: TestSyntheticDevicesControllerTestSuite/TestGetSyntheticDeviceMintingPayload_GetIntegrationFailed
tests
Process completed with exit code 1.
tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
tests
Restore cache failed: Dependencies file is not found in /home/runner/work/devices-api/devices-api. Supported file pattern: go.sum