@@ -5,7 +5,7 @@ import path from "path";
55describe ( "Ocean CLI Setup" , function ( ) {
66 this . timeout ( 20000 ) ; // Set a longer timeout to allow the command to execute
77
8- it ( "should return a valid response for 'npm run cli h' with MNEMONIC and PRIVATE_KEY " , function ( done ) {
8+ it ( "should return a valid response for 'npm run cli h'" , function ( done ) {
99 // Ensure the command is run from the project root directory
1010 const projectRoot = path . resolve ( __dirname , ".." ) ;
1111
@@ -16,19 +16,34 @@ describe("Ocean CLI Setup", function() {
1616 exec ( "npm run cli h" , { cwd : projectRoot } , ( error , stdout ) => {
1717 // Check the stdout for the expected response
1818 try {
19- expect ( stdout ) . to . contain ( "Available options:" ) ;
20- expect ( stdout ) . to . contain ( "getDDO DID" ) ;
21- expect ( stdout ) . to . contain ( "publish METADATA_FILE ENCRYPT_DDO" ) ;
22- expect ( stdout ) . to . contain ( "publishAlgo METADATA_FILE ENCRYPT_DDO" ) ;
23- expect ( stdout ) . to . contain ( "editAsset DATASET_DID UPDATED_METADATA_FILE ENCRYPT_DDO" ) ;
24- expect ( stdout ) . to . contain ( "download DID DESTINATION_FOLDER" ) ;
25- expect ( stdout ) . to . contain ( "allowAlgo DATASET_DID ALGO_DID ENCRYPT_DDO" ) ;
26- expect ( stdout ) . to . contain ( "disallowAlgo DATASET_DID ALGO_DID ENCRYPT_DDO" ) ;
27- expect ( stdout ) . to . contain ( "startCompute [DATASET_DIDs] ALGO_DID COMPUTE_ENV_ID" ) ;
28- expect ( stdout ) . to . contain ( "stopCompute DATASET_DID JOB_ID" ) ;
29- expect ( stdout ) . to . contain ( "getJobStatus DATASET_DID JOB_ID" ) ;
30- expect ( stdout ) . to . contain ( "getJobResults DATASET_DID JOB_ID" ) ;
31- expect ( stdout ) . to . contain ( "downloadJobResults JOB_ID RESULT_INDEX DESTINATION_FOLDER" ) ;
19+ expect ( stdout ) . to . contain ( "-V, --version" ) ;
20+ expect ( stdout ) . to . contain ( "output the version number" ) ;
21+ expect ( stdout ) . to . contain ( "-h, --help" ) ;
22+ expect ( stdout ) . to . contain ( "Display help for command" ) ;
23+ expect ( stdout ) . to . contain ( "help|h" ) ;
24+ expect ( stdout ) . to . contain ( "Display help for all commands" ) ;
25+ expect ( stdout ) . to . contain ( "getDDO <did>" ) ;
26+ expect ( stdout ) . to . contain ( "Gets DDO for an asset using the asset did" ) ;
27+ expect ( stdout ) . to . contain ( "publish [options] <metadataFile>" ) ;
28+ expect ( stdout ) . to . contain ( "Publishes a new asset with access service or compute service" ) ;
29+ expect ( stdout ) . to . contain ( "publishAlgo [options] <metadataFile>" ) ;
30+ expect ( stdout ) . to . contain ( "Publishes a new algorithm" ) ;
31+ expect ( stdout ) . to . contain ( "editAsset [options] <datasetDid> <metadataFile>" ) ;
32+ expect ( stdout ) . to . contain ( "Updates DDO using the metadata items in the file" ) ;
33+ expect ( stdout ) . to . contain ( "download <did> [destinationFolder]" ) ;
34+ expect ( stdout ) . to . contain ( "Downloads an asset into specified folder" ) ;
35+ expect ( stdout ) . to . contain ( "allowAlgo [options] <datasetDid> <algoDid>" ) ;
36+ expect ( stdout ) . to . contain ( "Approves an algorithm to run on a dataset" ) ;
37+ expect ( stdout ) . to . contain ( "startCompute <datasetDids> <algoDid> <computeEnvId>" ) ;
38+ expect ( stdout ) . to . contain ( "Starts a compute job" ) ;
39+ expect ( stdout ) . to . contain ( "stopCompute <datasetDid> <jobId> [agreementId]" ) ;
40+ expect ( stdout ) . to . contain ( "Stops a compute job" ) ;
41+ expect ( stdout ) . to . contain ( "getJobStatus <datasetDid> <jobId> [agreementId]" ) ;
42+ expect ( stdout ) . to . contain ( "Displays the compute job status" ) ;
43+ expect ( stdout ) . to . contain ( "downloadJobResults <jobId> <resultIndex> [destinationFolder]" ) ;
44+ expect ( stdout ) . to . contain ( "Downloads compute job results" ) ;
45+ expect ( stdout ) . to . contain ( "mintOcean" ) ;
46+ expect ( stdout ) . to . contain ( "Mints Ocean tokens" ) ;
3247 done ( ) ;
3348 } catch ( assertionError ) {
3449 done ( assertionError ) ;
0 commit comments