fix(cli): remove doctor --fix and services --mode, which did nothing (#53)

doctor --fix only hid the hint text and services --mode filtered nothing, because the server does not report service modes. Both flags are removed rather than kept as promises; doctor's summary now points at the Fix line under each failed check. services --mode can return once the server exposes service metadata (BL-065).

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-10-10 21:38:43 -05:00
1 parent 771b353733
commit 1a7e84cd23
4 files changed
+40 -8

No files matched your search

@@ -0,0 +1,39 @@
package io.floci.cli.unit;
import io.floci.cli.FlociCli;
import io.floci.cli.config.ProfileStore;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import picocli.CommandLine;
import picocli.CommandLine.UnmatchedArgumentException;
import java.nio.file.Path;
import static org.junit.jupiter.api.Assertions.*;
/**
* BL-051, BL-052: doctor --fix fixed nothing and services --mode filtered nothing, so both were
* removed rather than kept as promises. They stay rejected in every product tree.
*/
class RemovedFlagsTest {
@TempDir
Path tempDir;
private CommandLine cli() {
return FlociCli.buildCommandLine(new ProfileStore(tempDir));
}
@ParameterizedTest
@ValueSource(strings = {"aws", "gcp", "az", "oci"})
void doctorHasNoFixFlag(String product) {
assertThrows(UnmatchedArgumentException.class, () -> cli().parseArgs(product, "doctor", "--fix"));
}
@ParameterizedTest
@ValueSource(strings = {"aws", "gcp", "az", "oci"})
void servicesHasNoModeFlag(String product) {
assertThrows(UnmatchedArgumentException.class, () -> cli().parseArgs(product, "services", "--mode", "docker"));
}
}