Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*
* manateeAdmUsage.test.js: test invocations of the "manatee-adm" command
* Just run this test directly with Node, not with nodeunit. All manatee-adm
* subcommands should be covered by a test case below. This program will fail
* if it finds a subcommand with no test cases.
*/
var assertplus = require('assert-plus');
var forkexec = require('forkexec');
var path = require('path');
var vasync = require('vasync');
var VError = require('verror');
var extsprintf = require('extsprintf');
var sprintf = extsprintf.sprintf;
var fprintf = extsprintf.fprintf;
/*
* Test cases are configured with the "subcmds" object below, which specifies
* two properties for each "manatee-adm" subcommand:
*
* o the list of required arguments
*
* o whether running the command with all required arguments is
* "destructive", by which we mean only that it makes any actual changes
* to a Manatee cluster
*
* Using this configuration, the test suite will invoke the subcommand several
* times:
*
* o For each required argument, the subcommand will be invoked once with
* that argument _missing_ but the other required arguments present. The