All files / src/commands/k8s k8s.version.check.command.js

88.88% Statements 16/18
100% Branches 1/1
0% Functions 0/1
88.88% Lines 16/18

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x     193x 193x  
import { defineCommand } from '../../lib/define-command.js';
import { k8sCheckVersion } from '../../lib/k8s.js';
import { humanJsonOutputFormatOption, orgaIdOrNameOption } from '../global.options.js';
import { k8sIdOrNameArg } from './k8s.args.js';
 
export const k8sVersionCheckCommand = defineCommand({
  description: 'Check a Kubernetes cluster deployed version',
  since: '4.9.0',
  options: {
    org: orgaIdOrNameOption,
    format: humanJsonOutputFormatOption,
  },
  args: [k8sIdOrNameArg],
  async handler(options, clusterIdOrName) {
    const { format, org: orgIdOrName } = options;
    await k8sCheckVersion(orgIdOrName, clusterIdOrName, format);
  },
});