-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates load balancer init process to initialize with hosts (#74)
* Fixes creating a control plane node without a load balancer * Init load balancers with masters * Log masters being set in load balancer * Pulls the lb config file generation into a tested function
- Loading branch information
Showing
3 changed files
with
57 additions
and
16 deletions.
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
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,24 @@ | ||
package hope | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
import ( | ||
log "github.com/sirupsen/logrus" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestLoadBalancerConfigurationFileNoMasters(t *testing.T) { | ||
masters := []Node{} | ||
config := loadBalancerConfigurationFile(log.WithFields(log.Fields{}), &masters) | ||
assert.Contains(t, config, "0.0.0.0:6443") | ||
} | ||
|
||
func TestLoadBalancerConfigurationFileMasters(t *testing.T) { | ||
masters := []Node{ | ||
Node{Host: "192.168.1.254"}, | ||
} | ||
config := loadBalancerConfigurationFile(log.WithFields(log.Fields{}), &masters) | ||
assert.Contains(t, config, "192.168.1.254:6443") | ||
} |