-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added bootstrapping export mode (#3649)
* added export mode cli bootstrap * rebased PR
- Loading branch information
Showing
27 changed files
with
583 additions
and
126 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package bootstrap | ||
|
||
import ( | ||
"bytes" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
. "github.com/weaveworks/weave-gitops-enterprise/pkg/bootstrap/steps" | ||
) | ||
|
||
func Test_executeSteps(t *testing.T) { | ||
|
||
var buf bytes.Buffer | ||
|
||
config := MakeTestConfig(t, Config{ | ||
Output: &buf, | ||
ClusterUserAuth: ClusterUserAuthConfig{ | ||
Password: "password123", | ||
}, | ||
ModesConfig: ModesConfig{ | ||
Silent: true, | ||
Export: true, | ||
}, | ||
}) | ||
clusterUserAuthStep, err := NewAskAdminCredsSecretStep(config.ClusterUserAuth, config.ModesConfig) | ||
assert.NoError(t, err) | ||
|
||
steps := []BootstrapStep{ | ||
clusterUserAuthStep, | ||
} | ||
|
||
t.Run("should support export", func(t *testing.T) { | ||
err := execute(config, steps) | ||
assert.NoError(t, err) | ||
assert.Contains(t, buf.String(), "cluster-user-auth") | ||
}) | ||
|
||
} |
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.