8000 e2e:fix-digital-ocean-ports by jmalicevic · Pull Request #1678 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

e2e:fix-digital-ocean-ports #1678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions test/e2e/pkg/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ type InfrastructureData struct {
// InstanceData contains the relevant information for a machine instance backing
// one of the nodes in the testnet.
type InstanceData struct {
IPAddress net.IP `json:"ip_address"`
ExtIPAddress net.IP `json:"ext_ip_address"`
Port uint32 `json:"port"`
IPAddress net.IP `json:"ip_address"`
ExtIPAddress net.IP `json:"ext_ip_address"`
RPCPort uint32 `json:"rpc_port"`
GRPCPort uint32 `json:"grpc_port"`
PrivilegedGRPCPort uint32 `json:"privileged_grpc_port"`
}

func sortNodeNames(m Manifest) []string {
Expand Down Expand Up @@ -74,9 +76,11 @@ func NewDockerInfrastructureData(m Manifest) (InfrastructureData, error) {
localHostIP := net.ParseIP("127.0.0.1")
for _, name := range sortNodeNames(m) {
ifd.Instances[name] = InstanceData{
IPAddress: ipGen.Next(),
ExtIPAddress: localHostIP,
Port: portGen.Next(),
IPAddress: ipGen.Next(),
ExtIPAddress: localHostIP,
RPCPort: portGen.Next(),
GRPCPort: portGen.Next(),
PrivilegedGRPCPort: portGen.Next(),
}

}
Expand Down
7 changes: 3 additions & 4 deletions test/e2e/pkg/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ func NewTestnetFromManifest(manifest Manifest, file string, ifd InfrastructureDa
dir := strings.TrimSuffix(file, filepath.Ext(file))

keyGen := newKeyGenerator(randomSeed)
proxyPortGen := newPortGenerator(proxyPortFirst)
prometheusProxyPortGen := newPortGenerator(prometheusProxyPortFirst)
_, ipNet, err := net.ParseCIDR(ifd.Network)
if err != nil {
Expand Down Expand Up @@ -230,9 +229,9 @@ func NewTestnetFromManifest(manifest Manifest, file string, ifd InfrastructureDa
NodeKey: keyGen.Generate("ed25519"),
InternalIP: ind.IPAddress,
ExternalIP: extIP,
RPCProxyPort: proxyPortGen.Next(),
GRPCProxyPort: proxyPortGen.Next(),
GRPCPrivilegedProxyPort: proxyPortGen.Next(),
RPCProxyPort: ind.RPCPort,
GRPCProxyPort: ind.GRPCPort,
GRPCPrivilegedProxyPort: ind.PrivilegedGRPCPort,
Mode: ModeValidator,
Database: "goleveldb",
ABCIProtocol: Protocol(testnet.ABCIProtocol),
Expand Down
0