Commit Graph

11 Commits

Author SHA1 Message Date
Christina Ying Wang
e1bacda580 Update host-config, route, and action tests for host config endpoints
Change-type: minor
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-11 15:48:13 -08:00
Christina Ying Wang
250684d651 Use actions & write tests for GET /v1/device
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-11 15:48:13 -08:00
Christina Ying Wang
72c683d5ff Use actions & write tests for GET /v1/apps/:appId
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-11 15:48:13 -08:00
Christina Ying Wang
198d9ad638 Write update action and tests, remove isReadyForUpdate check
See: #1924
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-11 15:48:13 -08:00
Christina Ying Wang
85392f2a85 Move reboot/shutdown to actions and related tests to integration
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-11 15:48:13 -08:00
Christina Ying Wang
c6cf6a0136 Use executeServiceAction for v1/v2 service action endpoints
This includes:
- /v1/apps/:appId/(stop|start)
- /v2/applications/:appId/(restart|stop|start)-service

Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-09 18:20:24 -08:00
Christina Ying Wang
fcd28591c6 Add tests for doPurge action and v1/v2 app purge routes
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-09 16:25:27 -08:00
Christina Ying Wang
a24d5acf7f Add tests for doRestart action and v1/v2 app restart routes
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-09 16:25:27 -08:00
Christina Ying Wang
d6298b2643 Use regenerateKey action for POST /v1/regenerate-api-key
This also adds a 500 response with the old key if the API key
refresh was unsuccessful. Previously, if the key refresh was
unsuccessful, this would result in an UnhandledPromiseRejection.
This is a new interface.

Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-09 16:25:27 -08:00
Christina Ying Wang
c7db3189ad Use identify action for POST /v1/blink
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-09 16:01:43 -08:00
Christina Ying Wang
e351ed9803 Use runHealthchecks action for GET /v1/healthy
Signed-off-by: Christina Ying Wang <christina@balena.io>
2023-01-09 16:01:43 -08:00