Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the join command to have tested SSH commands #276

Open
alexellis opened this issue Oct 21, 2020 · 0 comments
Open

Refactor the join command to have tested SSH commands #276

alexellis opened this issue Oct 21, 2020 · 0 comments

Comments

@alexellis
Copy link
Owner

alexellis commented Oct 21, 2020

Expected Behaviour

We should refactor the join command to have tested SSH commands just like I did for the install command in this patch: fd18d77#diff-0ad45407eb1c7c8830d260d38994acb374ec5b7e36bc891e54406206074e5a99

By refactoring to a method, testing becomes easier and regression is less likely between changes and adding additional features such as #274.

Current Behaviour

String concatenation with fmt.Sprintf, no regression tests

Possible Solution

Copy the approach of makeInstallExec but for makeJoinExec perhaps?

Note that there are TWO ssh commands here - one for joining an agent, and one for joining an agent that acts as a backup / secondary server.

See also: join command - https://github.com/alexellis/k3sup/blob/master/cmd/join.go#L205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant