mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 18:17:40 +00:00
Fix Reusable typo, add tests for Augustines scenario
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user