Paulo Castro
7c1faa6de0
Add multicontainer (microservices) support for 'balena env rm'
...
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-12 13:39:26 +00:00
Paulo Castro
90e184ea1f
Add multicontainer (microservices) support for 'balena env add'
...
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
Paulo Castro
38920a1c59
Add multicontainer (microservices) support for 'balena envs'
...
Connects-to: #1153
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-11 17:50:08 +00:00
Paulo Castro
df58ac7673
Add balena envs '-j' option to produce JSON output
...
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-06 15:51:09 +00:00
Paulo Castro
630d53311a
Add logged-in check for balena 'env' commands
...
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-12-06 15:51:09 +00:00
Scott Lowe
bb19903826
Update app/create and device/supported tests to use new api-mock.
...
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-12-05 15:10:44 +01:00
Scott Lowe
33210b896b
Introduce balena-api-mock module to simplify api mocking.
...
Upgrade nock to latest.
Change-type: minor
Signed-off-by: Scott Lowe <scott@balena.io>
2019-12-05 15:10:34 +01:00
Scott Lowe
1325fb8c9a
Use helpers version of cleanOutput
in tests.
...
Simplify expect semantics in tests.
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:56 +01:00
Scott Lowe
cf42dca777
Hide discontinued device types in balena app create
.
...
Add basic tests for `balena app create`
Connects-to: #1485
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:56 +01:00
Scott Lowe
afd97bd304
Hide discontinued device types in balena devices supported
.
...
Add tests for action.
Convert action to TypeScript.
Connects-to: #1485
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-15 12:01:55 +01:00
Paulo Castro
d94a74dfee
Fix 'os configure --config', and migrate it to oclif + TypeScript
...
Also add more non-interactive configuration options:
--config-network, --config-wifi-*, --config-app-update-poll-interval
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-12 21:09:18 +00:00
Paulo Castro
b69ba0b617
Improve command usage format consistency in 'balena help' output
...
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
Paulo Castro
2222a90884
Enable debug-mode "long stack traces" for Bluebird promises (async code)
...
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-11-10 00:54:22 +00:00
Scott Lowe
4a967b126b
Fix warnings when executing CLI without arguments.
...
Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
2019-11-01 16:21:36 +01:00
Paulo Castro
cc45d872c7
Update CLI tests to pass with Node 12
...
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-10-14 01:27:34 +01:00
Paulo Castro
c07b28e694
Migrate 'envs' and 'env rename' commands to oclif
...
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-09-18 12:54:31 +01:00
Paulo Castro
19c3178062
Enable emulated builds on remote devices running a different OS as the CLI
...
E.g. "balena build -e -h <IP> -p 2375" with the CLI running on a Mac laptop,
using balenaEngine on an Intel NUC device, building an image for the RPi (ARM
image arch). Previously, QEMU setup by the CLI assumed that docker ran on the
same OS as the CLI (Docker for Mac has built-in binfmt_misc support and does
not require additional setup, but balenaEngine on Linux requires explicit QEMU
setup.)
Change-type: minor
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-08-22 13:37:07 +01:00
Lucian
730c09989d
Fix incorrect arguments passed to oclif bootstrap function
...
Adds tests for existing oclif commands to avoid regressions
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-15 18:26:42 +01:00
Lucian
4d389bb6cc
Implement full command testing, beginning with "balena version"
...
This also modifies the core CLI to be fed command programatically, which
is useful for being able to do thing like mock endpoints with tools like
"nock", and provide an easier debugging experience.
The tests utilise a "runCommand" helper that intercepts and captures
stdout/stderr writes and returns them once the command has finished
running. At this point the test implementation can parse the
stdout/stderr logs and assess nock interceptions to determine if the
command ran correctly.
This change also homogenises debug messages to start with `[debug]`,
however this is not strictly enforced by linting rules.
Change-type: minor
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-12 14:50:41 +01:00
Lucian
13610ef814
Convert test files to Typescript
...
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-08 16:50:50 +01:00
Lucian
ebd8f348ca
Decaffeinate test files
...
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-08 13:53:00 +01:00
Lucian
15dfdc2229
Remove mochainon dependency and replace with direct testing dependencies
...
Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-08-08 10:04:32 +01:00
Tim Perry
4907fccf48
Rename everything from 'resin' to 'balena'
...
Change-type: major
2018-10-29 22:29:02 +01:00
Cameron Diver
88e11347bc
tests: Add tests for ignore files
...
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-10-19 16:43:28 +02:00
Tim Perry
ce64889b04
Clarify isTokenValid logic
2018-03-29 11:11:25 +02:00
Tim Perry
d3a0bfc5f6
Fix auth utils tests to work with new SDK
2018-03-29 11:11:25 +02:00
Tim Perry
0e2fb8c96c
Promisify auth utils tests
2018-03-29 11:11:25 +02:00
Tim Perry
001c8f9601
Inline the entire resin-cli-auth module
...
This is part of a general push to demodularize any code that isn't
realistically reusable outside resin-cli, to make the codebase easier to
manage and understand. Once this is done, we'll deprecate the original
module itself.
Change-Type: patch
2017-11-27 12:02:57 +02:00
Juan Cruz Viotti
904b9f07fb
Highlight errors in red
...
- Move error translation logic to resin-io/resin-cli-errors.
- Force `process.exit()`.
2015-09-11 14:47:38 +03:00
Juan Cruz Viotti
f712064ab4
Move tests to tests/ and flatten errors/ module directory
2015-02-10 11:38:19 -04:00
Juan Cruz Viotti
043a34cc7c
Decouple permissions from http mocks and fixtures
2015-01-13 08:51:02 -03:00
Juan Cruz Viotti
f000509995
Get rid of utils/mock
2015-01-08 09:43:50 -03:00
Juan Cruz Viotti
12f46be691
Partially get rid of nested sdk
2015-01-08 09:39:38 -03:00
Juan Cruz Viotti
8ac36ced4d
Decouple resin sdk from it's surroundings
2015-01-06 15:02:03 -03:00
Juan Cruz Viotti
08e8cfbb09
Fix settings get bug in mocks
2014-12-05 11:49:00 -04:00
Juan Cruz Viotti
511e753256
Support user defined configuration file
2014-12-03 12:03:54 -04:00
Juan Cruz Viotti
9529e6c335
Move config to resin module
2014-11-26 13:42:05 -04:00
Juan Cruz Viotti
a6099b227b
Require internet connection before attempting to use server module
2014-11-25 09:02:50 -04:00
Juan Cruz Viotti
58cc0be0c9
Cleanup tests
2014-11-14 15:48:37 -04:00
Juan Cruz Viotti
41d73eaf98
Implement precarious token persistence mechanism
2014-10-31 15:19:16 -04:00