-
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.
Fix fetching kubeadm join command from invalid masters (#77)
* Fixes wrong masters used for initializing another * Adds a degenerate test case for node management
- Loading branch information
Showing
3 changed files
with
25 additions
and
7 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,18 @@ | ||
package hope | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
import ( | ||
log "github.com/sirupsen/logrus" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestSetupCommonNodeRequirementsNotKubernetesNode(t *testing.T) { | ||
node := Node{ | ||
Role: "load-balancer", | ||
} | ||
err := setupCommonNodeRequirements(log.WithFields(log.Fields{}), &node) | ||
assert.Error(t, err, "Node has role load-balancer, should not prepare as Kubernetes node") | ||
} |