WIP: Phase 2 #2

Draft
dubey wants to merge 27 commits from phase2 into main
12 changed files with 669 additions and 34 deletions
Showing only changes of commit 800e4f72f2 - Show all commits

View File

@ -52,7 +52,7 @@ func StartEmbeddedEtcd(cfg EtcdEmbedConfig) (*embed.Etcd, error) {
embedCfg.Name = cfg.Name
embedCfg.Dir = cfg.DataDir
embedCfg.InitialClusterToken = "kat-etcd-cluster" // Make this configurable if needed
embedCfg.ForceNewCluster = false // Set to true only for initial bootstrap of a new cluster if needed
embedCfg.ForceNewCluster = false // Set to true only for initial bootstrap of a new cluster if needed
lpurl, err := parseURLs(cfg.PeerURLs)
if err != nil {

View File

@ -23,10 +23,10 @@ func TestEtcdStore(t *testing.T) {
// Configure and start embedded etcd
etcdConfig := EtcdEmbedConfig{
Name: "test-node",
DataDir: tempDir,
ClientURLs: []string{"http://localhost:0"}, // Use port 0 to get a random available port
PeerURLs: []string{"http://localhost:0"},
Name: "test-node",
DataDir: tempDir,
ClientURLs: []string{"http://localhost:0"}, // Use port 0 to get a random available port
PeerURLs: []string{"http://localhost:0"},
}
etcdServer, err := StartEmbeddedEtcd(etcdConfig)
@ -232,10 +232,10 @@ func TestLeaderElection(t *testing.T) {
// Configure and start embedded etcd
etcdConfig := EtcdEmbedConfig{
Name: "election-test-node",
DataDir: tempDir,
ClientURLs: []string{"http://localhost:0"},
PeerURLs: []string{"http://localhost:0"},
Name: "election-test-node",
DataDir: tempDir,
ClientURLs: []string{"http://localhost:0"},
PeerURLs: []string{"http://localhost:0"},
}
etcdServer, err := StartEmbeddedEtcd(etcdConfig)