-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify that cert manager is installed (#1186)
* Added check that cert-manager is installed if webhooks are enabled * Refactoring for the init process Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
- Loading branch information
1 parent
8afbb97
commit 0a0c883
Showing
23 changed files
with
581 additions
and
172 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
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,32 @@ | ||
package prereq | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
|
||
"github.com/kudobuilder/kudo/pkg/kudoctl/kudoinit" | ||
"github.com/kudobuilder/kudo/pkg/kudoctl/verifier" | ||
) | ||
|
||
func TestPrereq_Fail_PreValidate_CustomNamespace(t *testing.T) { | ||
client := getFakeClient() | ||
|
||
init := NewInitializer(kudoinit.NewOptions("", "customNS", "", make([]string, 0))) | ||
|
||
result := init.PreInstallVerify(client) | ||
|
||
assert.EqualValues(t, verifier.NewError("Namespace customNS does not exist - KUDO expects that any namespace except the default kudo-system is created beforehand"), result) | ||
} | ||
|
||
func TestPrereq_Ok_PreValidate_CustomNamespace(t *testing.T) { | ||
client := getFakeClient() | ||
|
||
mockGetNamespace(client, "customNS") | ||
|
||
init := NewInitializer(kudoinit.NewOptions("", "customNS", "", make([]string, 0))) | ||
|
||
result := init.PreInstallVerify(client) | ||
|
||
assert.EqualValues(t, verifier.NewResult(), result) | ||
} |
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
Oops, something went wrong.