Skip to content

Commit

Permalink
Issue #878 Simplified login ux by formatting creds for copy-pasting
Browse files Browse the repository at this point in the history
  • Loading branch information
rinormaloku authored and cfergeau committed Dec 13, 2019
1 parent 9f9d19b commit 71de1a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/crc/cmd/console.go
Expand Up @@ -60,8 +60,8 @@ func runConsole(arguments []string) {
output.Outln(result.ClusterConfig.WebConsoleURL)
}
if consolePrintCredentials {
output.Outln("To login as a regular user, username is 'developer' and password is 'developer'.")
output.Outf("To login as an admin, username is 'kubeadmin' and password is '%s'.\n", result.ClusterConfig.KubeAdminPass)
output.Outf("To login as a regular user, run 'oc login -u developer -p developer %s'.\n", result.ClusterConfig.ClusterAPI)
output.Outf("To login as an admin, run 'oc login -u kubeadmin -p %s %s'\n", result.ClusterConfig.KubeAdminPass, result.ClusterConfig.ClusterAPI)
}
if consolePrintURL || consolePrintCredentials {
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/machine/machine.go
Expand Up @@ -382,7 +382,7 @@ func Start(startConfig StartConfig) (StartResult, error) {
logging.Infof("")
logging.Infof("To access the cluster, first set up your environment by following 'crc oc-env' instructions")
logging.Infof("Then you can access it by running 'oc login -u developer -p developer %s'", result.ClusterConfig.ClusterAPI)
logging.Infof("To login as an admin, username is 'kubeadmin' and password is %s", result.ClusterConfig.KubeAdminPass)
logging.Infof("To login as an admin, run 'oc login -u kubeadmin -p %s %s'", result.ClusterConfig.KubeAdminPass, result.ClusterConfig.ClusterAPI)
logging.Infof("")
logging.Infof("You can now run 'crc console' and use these credentials to access the OpenShift web console")
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/features/basic.feature
Expand Up @@ -112,8 +112,8 @@ Feature: Basic test
@darwin @linux @windows
Scenario: CRC console credentials
When executing "crc console --credentials" succeeds
Then stdout should contain "To login as a regular user, username is 'developer' and password is 'developer'."
And stdout should contain "To login as an admin, username is 'kubeadmin' and password is "
Then stdout should contain "To login as a regular user, run 'oc login -u developer -p developer"
And stdout should contain "To login as an admin, run 'oc login -u kubeadmin -p "

@darwin @linux @windows
Scenario: CRC forcible stop
Expand Down

0 comments on commit 71de1a1

Please sign in to comment.