[NC-1581] Remove SyncMode CLI flag (#27)

* comment out the @Option annotation

* eliminate syncModeOptionMustBeUsed

* update to OverrideDefaultValuesIfKeyIsPresentInConfigFile

* unify on comment out approach
S. Matthew English 6 years ago committed by GitHub
parent 19cd63315d
commit b06bdbdcbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      pantheon/src/main/java/net/consensys/pantheon/cli/PantheonCommand.java
  2. 8
      pantheon/src/test/java/net/consensys/pantheon/cli/PantheonCommandTest.java

@ -182,12 +182,14 @@ public class PantheonCommand implements Runnable {
)
private final Integer maxTrailingPeers = Integer.MAX_VALUE;
@Option(
names = {"--sync-mode"},
paramLabel = MANDATORY_MODE_FORMAT_HELP,
description =
"Synchronization mode (Value can be one of ${COMPLETION-CANDIDATES}, default: ${DEFAULT-VALUE})"
)
// TODO: Re-enable as per NC-1057/NC-1681
// @Option(
// names = {"--sync-mode"},
// paramLabel = MANDATORY_MODE_FORMAT_HELP,
// description =
// "Synchronization mode (Value can be one of ${COMPLETION-CANDIDATES}, default:
// ${DEFAULT-VALUE})"
// )
private final SyncMode syncMode = DEFAULT_SYNC_MODE;
// Boolean option to indicate if the client have to sync against the ottoman test network

@ -34,6 +34,7 @@ import java.util.Optional;
import com.google.common.collect.Lists;
import com.google.common.io.Resources;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@ -227,7 +228,8 @@ public class PantheonCommandTest extends CommandTestAbstract {
anyBoolean(),
anyInt());
verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FAST));
// TODO: Re-enable as per NC-1057/NC-1681
// verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FAST));
assertThat(commandErrorOutput.toString()).isEmpty();
@ -257,7 +259,8 @@ public class PantheonCommandTest extends CommandTestAbstract {
verify(mockControllerBuilder)
.build(any(), eq(null), any(), eq(false), any(), eq(false), anyInt());
verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FULL));
// TODO: Re-enable as per NC-1057/NC-1681
// verify(mockSyncConfBuilder).syncMode(ArgumentMatchers.eq(SyncMode.FULL));
assertThat(commandErrorOutput.toString()).isEmpty();
@ -408,6 +411,7 @@ public class PantheonCommandTest extends CommandTestAbstract {
assertThat(commandErrorOutput.toString()).isEmpty();
}
@Ignore
@Test
public void syncModeOptionMustBeUsed() {

Loading…
Cancel
Save