-
Notifications
You must be signed in to change notification settings - Fork 79
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
testutil/compose: add lock command #570
Conversation
Codecov Report
@@ Coverage Diff @@
## main #570 +/- ##
==========================================
- Coverage 54.39% 54.16% -0.23%
==========================================
Files 92 94 +2
Lines 8496 8716 +220
==========================================
+ Hits 4621 4721 +100
- Misses 3243 3320 +77
- Partials 632 675 +43
Continue to review full report at Codecov.
|
return nil | ||
} | ||
|
||
func newDefaultConfig(seed int) (config, []*ecdsa.PrivateKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extracted function
version: "3.8" | ||
|
||
x-node-base: &node-base | ||
image: ghcr.io/obolnetwork/charon:latest | ||
entrypoint: /usr/local/bin/charon | ||
command: [create,cluster] | ||
networks: [compose] | ||
volumes: [testdir:/compose] | ||
|
||
|
||
services: | ||
|
||
node0: | ||
<<: *node-base | ||
environment: | ||
CHARON_THRESHOLD: 3 | ||
CHARON_NODES: 4 | ||
CHARON_CLUSTER_DIR: /compose | ||
|
||
|
||
networks: | ||
compose: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the resulting docker-compose to run charon create cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
x-node-base: &node-base | ||
image: ghcr.io/obolnetwork/charon:latest | ||
entrypoint: /usr/local/bin/charon | ||
command: [create,cluster] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this means space separated command names?
like charon create dkg would be [create, dkg]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, otherwise it is a single argument: charon create cluster
vs charon 'create cluster'
} | ||
} | ||
// nodeFile returns the path to a file in a node folder. | ||
func nodeFile(dir string, i int, file string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why a separate function for just one line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easier to read, and used in many places
Adds the first version of the lock command that creates a docker-compose file to run
charon create cluster
to generate keys and cluster lock file.category: feature
ticket: #568