-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAB-16544 IT for orderer endpoint overrides
Adds a simple IT to verify the functionality of the orderer endpoint overrides. The IT is a standalone in the e2e, deploying one Raft orderer and one channel, with one peer in that channel. The test verifies that despite the orderer address in the config pointing to an unreachable location on the network, the overrides allow the peer to still receive an updated config block. Signed-off-by: Jason Yellick <jyellick@us.ibm.com> Change-Id: Ic9380813a93d28d15e307605d4d1813c0db02537
- Loading branch information
Showing
5 changed files
with
212 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
/* | ||
Copyright IBM Corp. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package fabricconfig | ||
|
||
import "time" | ||
|
||
type ConfigTx struct { | ||
Organizations []*Organization `yaml:"Organizations,omitempty"` | ||
Capabilities *Capabilities `yaml:"Capabilities,omitempty"` | ||
Application *Application `yaml:"Application,omitempty"` | ||
Orderer *ConfigTxOrderer `yaml:"Orderer,omitempty"` | ||
Channel *Channel `yaml:"Channel,omitempty"` | ||
Profiles map[string]*Channel `yaml:"Profiles,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type Organization struct { | ||
Name string `yaml:"Name,omitempty"` | ||
SkipAsForeign bool `yaml:"SkipAsForeign,omitempty"` | ||
ID string `yaml:"ID,omitempty"` | ||
MSPDir string `yaml:"MSPDir,omitempty"` | ||
Policies map[string]*Policy `yaml:"Policies,omitempty"` | ||
OrdererEndpoints []string `yaml:"OrdererEndpoints,omitempty"` | ||
AnchorPeers []*AnchorPeer `yaml:"AnchorPeers,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type Policy struct { | ||
Type string `yaml:"Type,omitempty"` | ||
Rule string `yaml:"Rule,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type Capabilities struct { | ||
Channel map[string]bool `yaml:"Channel,omitempty"` | ||
Orderer map[string]bool `yaml:"Orderer,omitempty"` | ||
Application map[string]bool `yaml:"Application,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type AnchorPeer struct { | ||
Host string `yaml:"Host,omitempty"` | ||
Port int `yaml:"Port,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type Application struct { | ||
ACLs map[string]string `yaml:"ACLs,omitempty"` | ||
Organizations []*Organization `yaml:"Organizations,omitempty"` | ||
Policies map[string]*Policy `yaml:"Policies,omitempty"` | ||
Capabilities map[string]bool `yaml:"Capabilities,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type ConfigTxOrderer struct { | ||
OrdererType string `yaml:"OrdererType,omitempty"` | ||
BatchTimeout time.Duration `yaml:"BatchTimeout,omitempty"` | ||
BatchSize *BatchSize `yaml:"BatchSize,omitempty"` | ||
Kafka *ConfigTxKafka `yaml:"Kafka,omitempty"` | ||
EtcdRaft *ConfigTxEtcdRaft `yaml:"EtcdRaft,omitempty"` | ||
Organizations []*Organization `yaml:"Organizations,omitempty"` | ||
Policies map[string]*Policy `yaml:"Policies,omitempty"` | ||
Capabilities map[string]bool `yaml:"Capabilities,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type BatchSize struct { | ||
MaxMessageCount string `yaml:"MaxMessageCount,omitempty"` | ||
AbsoluteMaxBytes string `yaml:"AbsoluteMaxBytes,omitempty"` | ||
PreferredMaxBytes string `yaml:"PreferredMaxBytes,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type ConfigTxKafka struct { | ||
Brokers []string `yaml:"Brokers,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type ConfigTxEtcdRaft struct { | ||
Consenters []*Consenter `yaml:"Consenters,omitempty"` | ||
Options *EtcdRaftOptions `yaml:"EtcdRaftOptions,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type Consenter struct { | ||
Host string `yaml:"Host,omitempty"` | ||
Port int `yaml:"Port,omitempty"` | ||
ClientTLSCert string `yaml:"ClientTLSCert,omitempty"` | ||
ServerTLSCert string `yaml:"ServerTLSCert,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type EtcdRaftOptions struct { | ||
TickInterval string `yaml:"TickInterval,omitempty"` | ||
ElectionTick string `yaml:"ElectionTick,omitempty"` | ||
HeartbeatTick string `yaml:"HeartbeatTick,omitempty"` | ||
MaxInflightBlocks string `yaml:"MaxInflightBlocks,omitempty"` | ||
SnapshotIntervalSize string `yaml:"SnapshotIntervalSize,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type Channel struct { | ||
Orderer *ConfigTxOrderer `yaml:"Orderer,omitempty"` | ||
Application *Application `yaml:"Application,omitempty"` | ||
Policies map[string]*Policy `yaml:"Policies,omitempty"` | ||
Capabilities map[string]bool `yaml:"Capabilities,omitempty"` | ||
Consortiums map[string]*Consortium `yaml:"Consortiums,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} | ||
|
||
type Consortium struct { | ||
Organizations []*Organization `yaml:"Organizations,omitempty"` | ||
|
||
ExtraProperties map[string]interface{} `yaml:",inline,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters