def METHOD_NAME(index, clirunner,
                                extended_eo3_metadata_type,
                                ls8_eo3_product, wo_eo3_product, africa_s2_eo3_product,
                                eo3_dataset_paths):
    # Tests with no datasets in db
    runner = clirunner(['dataset', 'add'], verbose_flag=False, expect_success=False)
    assert "Indexing datasets  [####################################]  100%" not in runner.output
    assert "Usage:  [OPTIONS] [DATASET_PATHS]" in runner.output
    assert "Add datasets" in runner.output
    assert runner.exit_code == 1
    runner = clirunner(['dataset', 'update'], verbose_flag=False, expect_success=False)
    assert "0 successful, 0 failed" not in runner.output
    assert "Usage:  [OPTIONS] [DATASET_PATHS]" in runner.output
    assert "Update datasets" in runner.output
    assert runner.exit_code == 1
    runner = clirunner(['dataset', 'info'], verbose_flag=False, expect_success=False)
    assert "Usage:  [OPTIONS] [IDS]" in runner.output
    assert "Display dataset information" in runner.output
    assert runner.exit_code == 1
    runner = clirunner(['dataset', 'uri-search'], verbose_flag=False, expect_success=False)
    assert "Usage:  [OPTIONS] [PATHS]" in runner.output
    assert "Search by dataset locations" in runner.output
    assert runner.exit_code == 1
    # Insert datasets
    for path in eo3_dataset_paths:
        result = clirunner(['dataset', 'add', "--ignore-lineage", path])
    runner = clirunner(['dataset', 'archive'], verbose_flag=False, expect_success=False)
    assert "Completed dataset archival." not in runner.output
    assert "Usage:  [OPTIONS] [IDS]" in runner.output
    assert "Archive datasets" in runner.output
    assert runner.exit_code == 1
    runner = clirunner(['dataset', 'archive', "--all"], verbose_flag=False)
    assert "Completed dataset archival." in runner.output
    assert "Usage:  [OPTIONS] [IDS]" not in runner.output
    assert "Archive datasets" not in runner.output
    assert runner.exit_code == 0
    runner = clirunner(['dataset', 'restore'], verbose_flag=False, expect_success=False)
    assert "Usage:  [OPTIONS] [IDS]" in runner.output
    assert "Restore datasets" in runner.output
    assert runner.exit_code == 1
    runner = clirunner(['dataset', 'restore', "--all"], verbose_flag=False)
    assert "restoring" in runner.output
    assert "Usage:  [OPTIONS] [IDS]" not in runner.output
    assert "Restore datasets" not in runner.output
    assert runner.exit_code == 0
    runner = clirunner(['dataset', 'purge'], verbose_flag=False, expect_success=False)
    assert "Completed dataset purge." not in runner.output
    assert "Usage:  [OPTIONS] [IDS]" in runner.output
    assert "Purge archived datasets" in runner.output
    assert runner.exit_code == 1
    runner = clirunner(['dataset', 'purge', "--all"], verbose_flag=False)
    assert "Completed dataset purge." in runner.output
    assert "Usage:  [OPTIONS] [IDS]" not in runner.output
    assert runner.exit_code == 0