Fix Reusable typo, add tests for Augustines scenario
This commit is contained in:
parent
6371135459
commit
0803c407a9
5 changed files with 103 additions and 4 deletions
|
@ -97,7 +97,7 @@ var registerNodeCmd = &cobra.Command{
|
|||
|
||||
response, err := client.RegisterMachine(ctx, request)
|
||||
if err != nil {
|
||||
ErrorOutput(err, fmt.Sprintf("Cannot register machine: %s\n", err), output)
|
||||
ErrorOutput(err, fmt.Sprintf("Cannot register machine: %s\n", status.Convert(err).Message()), output)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ var listPreAuthKeys = &cobra.Command{
|
|||
if k.GetEphemeral() {
|
||||
reusable = "N/A"
|
||||
} else {
|
||||
reusable = fmt.Sprintf("%v", k.GetResuable())
|
||||
reusable = fmt.Sprintf("%v", k.GetReusable())
|
||||
}
|
||||
|
||||
d = append(d, []string{
|
||||
|
@ -112,9 +112,15 @@ var createPreAuthKeyCmd = &cobra.Command{
|
|||
reusable, _ := cmd.Flags().GetBool("reusable")
|
||||
ephemeral, _ := cmd.Flags().GetBool("ephemeral")
|
||||
|
||||
log.Trace().
|
||||
Bool("reusable", reusable).
|
||||
Bool("ephemeral", ephemeral).
|
||||
Str("namespace", namespace).
|
||||
Msg("Preparing to create preauthkey")
|
||||
|
||||
request := &v1.CreatePreAuthKeyRequest{
|
||||
Namespace: namespace,
|
||||
Resuable: reusable,
|
||||
Reusable: reusable,
|
||||
Ephemeral: ephemeral,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue