mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 06:07:55 +00:00
Deprecate envs
command in favor of env list
Change-type: patch
This commit is contained in:
parent
3dee7bd6f6
commit
bb80311700
@ -2188,7 +2188,7 @@ port mapping in the format <remotePort>[:[localIP:]localPort]
|
|||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
|
|
||||||
- `envs`
|
- `envs` *(deprecated)*
|
||||||
|
|
||||||
|
|
||||||
To use one of the aliases, replace `env list` with the alias.
|
To use one of the aliases, replace `env list` with the alias.
|
||||||
|
1
src/commands/env/list.ts
vendored
1
src/commands/env/list.ts
vendored
@ -47,6 +47,7 @@ interface ServiceEnvironmentVariableInfo
|
|||||||
|
|
||||||
export default class EnvListCmd extends Command {
|
export default class EnvListCmd extends Command {
|
||||||
public static aliases = ['envs'];
|
public static aliases = ['envs'];
|
||||||
|
public static deprecateAliases = true;
|
||||||
|
|
||||||
public static description = stripIndent`
|
public static description = stripIndent`
|
||||||
List the environment or config variables of a fleet, device or service.
|
List the environment or config variables of a fleet, device or service.
|
||||||
|
9
tests/commands/env/list.spec.ts
vendored
9
tests/commands/env/list.spec.ts
vendored
@ -65,20 +65,17 @@ describe('balena env list', function () {
|
|||||||
api.expectGetAppEnvVars();
|
api.expectGetAppEnvVars();
|
||||||
api.expectGetAppServiceVars();
|
api.expectGetAppServiceVars();
|
||||||
|
|
||||||
const { out, err } = await runCommand(`envs -f ${appName}`);
|
const { out } = await runCommand(`envs -f ${appName}`);
|
||||||
|
|
||||||
expect(out.join('')).to.satisfy((msg: string) =>
|
expect(out.join('')).to.contain(
|
||||||
msg.endsWith(
|
stripIndent`
|
||||||
stripIndent`
|
|
||||||
ID NAME VALUE FLEET SERVICE
|
ID NAME VALUE FLEET SERVICE
|
||||||
120110 svar1 svar1-value gh_user/testApp service1
|
120110 svar1 svar1-value gh_user/testApp service1
|
||||||
120111 svar2 svar2-value gh_user/testApp service2
|
120111 svar2 svar2-value gh_user/testApp service2
|
||||||
120101 var1 var1-val gh_user/testApp *
|
120101 var1 var1-val gh_user/testApp *
|
||||||
120102 var2 22 gh_user/testApp *
|
120102 var2 22 gh_user/testApp *
|
||||||
` + '\n',
|
` + '\n',
|
||||||
),
|
|
||||||
);
|
);
|
||||||
expect(err.join('')).to.equal('');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should successfully list config vars for a test fleet', async () => {
|
it('should successfully list config vars for a test fleet', async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user