Skip to content

Commit 0ed6792

Browse files
authored
remove old config generation option (#168)
Signed-off-by: May.Buzaglo <May.Buzaglo@ibm.com>
1 parent 3d1602f commit 0ed6792

File tree

10 files changed

+19
-498
lines changed

10 files changed

+19
-498
lines changed

cmd/armageddon/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ This command enables to create configuration files for ARMA nodes.
3939
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
4040
| ` config` | The absolute or relative path to the configuration template to use |
4141
| ` output` | The absolute or relative path to which the configuration files will be saved. If missing configuration files will be saved under `arma-config` |
42-
| ` version` | The version of the configuration. The default is version=2. Configuration created by version=1 is not supported anymore |
4342
| ` sampleConfigPath` | The absolute or relative path to the sample config directory that includes the msp and the `configtx.yaml` file. For example, see `ARMA/testutil/fabric/sampleconfig` |
4443

4544
###

common/tools/armageddon/armageddon.go

Lines changed: 2 additions & 480 deletions
Large diffs are not rendered by default.

common/tools/armageddon/armageddon_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestArmageddonWithTLS(t *testing.T) {
4040
// 2.
4141
armageddon := armageddon.NewCLI()
4242
sampleConfigPath := fabric.GetDevConfigDir()
43-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2", "--sampleConfigPath", sampleConfigPath})
43+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--sampleConfigPath", sampleConfigPath})
4444

4545
// 3.
4646
// compile arma
@@ -80,7 +80,7 @@ func TestArmageddonWithTLSWithNoSampleConfigPathFlag(t *testing.T) {
8080

8181
// 2.
8282
armageddon := armageddon.NewCLI()
83-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
83+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir})
8484

8585
// 3.
8686
// compile arma
@@ -122,7 +122,7 @@ func TestLoadStepsAndReceive(t *testing.T) {
122122
// 2.
123123
armageddon := armageddon.NewCLI()
124124
sampleConfigPath := fabric.GetDevConfigDir()
125-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--useTLS", "--version", "2", "--sampleConfigPath", sampleConfigPath})
125+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--useTLS", "--sampleConfigPath", sampleConfigPath})
126126

127127
// 3.
128128
// compile arma
@@ -175,7 +175,7 @@ func TestLoadStepsFails(t *testing.T) {
175175
// 2.
176176
armageddon := armageddon.NewCLI()
177177
sampleConfigPath := fabric.GetDevConfigDir()
178-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2", "--sampleConfigPath", sampleConfigPath})
178+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--sampleConfigPath", sampleConfigPath})
179179

180180
// 3.
181181
// compile arma
@@ -225,7 +225,7 @@ func TestLoadAndReceive(t *testing.T) {
225225
// 2.
226226
armageddon := armageddon.NewCLI()
227227
sampleConfigPath := fabric.GetDevConfigDir()
228-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2", "--sampleConfigPath", sampleConfigPath})
228+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--sampleConfigPath", sampleConfigPath})
229229

230230
// 3.
231231
// compile arma
@@ -278,7 +278,7 @@ func TestArmageddonNonTLS(t *testing.T) {
278278
// 2.
279279
armageddon := armageddon.NewCLI()
280280
sampleConfigPath := fabric.GetDevConfigDir()
281-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2", "--sampleConfigPath", sampleConfigPath})
281+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--sampleConfigPath", sampleConfigPath})
282282

283283
// 3.
284284
// compile arma
@@ -321,7 +321,7 @@ func TestArmageddonSharedConfigProtoFromSharedConfigYAML(t *testing.T) {
321321
// 2.
322322
armageddon := armageddon.NewCLI()
323323
sampleConfigPath := fabric.GetDevConfigDir()
324-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2", "--sampleConfigPath", sampleConfigPath})
324+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--sampleConfigPath", sampleConfigPath})
325325

326326
// 3.
327327
sharedConfigYAMLPath := filepath.Join(dir, "bootstrap", "shared_config.yaml")
@@ -358,7 +358,7 @@ func TestArmageddonCreateBlockFromSharedConfigYAML(t *testing.T) {
358358
// 2.
359359
armageddon := armageddon.NewCLI()
360360
sampleConfigPath := fabric.GetDevConfigDir()
361-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2", "--sampleConfigPath", sampleConfigPath})
361+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--sampleConfigPath", sampleConfigPath})
362362

363363
// 3.
364364
sharedConfigYAMLPath := filepath.Join(dir, "bootstrap", "shared_config.yaml")
@@ -382,7 +382,7 @@ func TestArmageddonGenerateNewConfig(t *testing.T) {
382382
// 2.
383383
armageddon := armageddon.NewCLI()
384384
sampleConfigPath := fabric.GetDevConfigDir()
385-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2", "--sampleConfigPath", sampleConfigPath})
385+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--sampleConfigPath", sampleConfigPath})
386386

387387
// 3.
388388
err = checkConfigDir(dir)

node/examples/scripts/run_sample.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -eux
99

1010
make binary
1111

12-
./bin/armageddon generate --config="node/examples/config/example-deployment.yaml" --output="/tmp/arma-sample" --version=2
12+
./bin/armageddon generate --config="node/examples/config/example-deployment.yaml" --output="/tmp/arma-sample"
1313
cd node/examples && docker compose up -d
1414
sleep 10
1515

node/server/arma_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func setup(t *testing.T, offset int) string {
195195
CreateNetworkWithDefaultPorts(t, configPath, offset)
196196

197197
armageddon := armageddon.NewCLI()
198-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
198+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir})
199199
return dir
200200
}
201201

test/assembler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestSubmitStopThenRestartAssembler(t *testing.T) {
5050

5151
// 2.
5252
armageddon := armageddon.NewCLI()
53-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
53+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir})
5454

5555
// 3.
5656
// compile arma

test/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func TestSubmitAndReceive(t *testing.T) {
7676
require.NoError(t, err)
7777
numOfArmaNodes := len(netInfo)
7878
// 2.
79-
armageddon.NewCLI().Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
79+
armageddon.NewCLI().Run([]string{"generate", "--config", configPath, "--output", dir})
8080

8181
// 3.
8282
// run arma nodes

test/batcher_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestPrimaryBatcherRestartRecover(t *testing.T) {
5959
require.NoError(t, err)
6060
numOfArmaNodes := len(netInfo)
6161

62-
armageddon.NewCLI().Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
62+
armageddon.NewCLI().Run([]string{"generate", "--config", configPath, "--output", dir})
6363

6464
readyChan := make(chan struct{}, numOfArmaNodes)
6565
armaNetwork := testutil.RunArmaNodes(t, dir, armaBinaryPath, readyChan, netInfo)
@@ -226,7 +226,7 @@ func TestSecondaryBatcherRestartRecover(t *testing.T) {
226226
require.NoError(t, err)
227227
numOfArmaNodes := len(netInfo)
228228

229-
armageddon.NewCLI().Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
229+
armageddon.NewCLI().Run([]string{"generate", "--config", configPath, "--output", dir})
230230

231231
// run arma nodes
232232
// NOTE: if one of the nodes is not started within 10 seconds, there is no point in continuing the test, so fail it

test/consensus_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestSubmitStopThenRestartConsenter(t *testing.T) {
4343
netInfo := testutil.CreateNetwork(t, configPath, numOfParties, numOfShards, "TLS", "TLS")
4444

4545
armageddon := armageddon.NewCLI()
46-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
46+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir})
4747

4848
armaBinaryPath, err := gexec.BuildWithEnvironment("github.com/hyperledger/fabric-x-orderer/cmd/arma", []string{"GOPRIVATE=github.ibm.com"})
4949
require.NoError(t, err)

test/tx_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestTxClientSend(t *testing.T) {
3737
require.NoError(t, err)
3838
// 2.
3939
armageddon := armageddon.NewCLI()
40-
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir, "--version", "2"})
40+
armageddon.Run([]string{"generate", "--config", configPath, "--output", dir})
4141

4242
// 3.
4343
// compile arma

0 commit comments

Comments
 (0)