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

Improve tsh tests #5394

Merged
merged 1 commit into from
Feb 9, 2021
Merged

Improve tsh tests #5394

merged 1 commit into from
Feb 9, 2021

Conversation

fspmarshall
Copy link
Contributor

Various improvements to tests/testability for tsh, including coverage for #5323

utils.InitLoggerForTests(testing.Verbose())
os.RemoveAll(client.FullProfilePath(""))

defer os.RemoveAll(client.FullProfilePath(""))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the the removal of the default tsh login extremely hideous when working with the external environments (after a successful tsh login) and with (unit) tests - I think we should make an effort with replacing this with a temporary location as is otherwise customary for testing. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but currently tsh behavior does not allow custom profile paths. It should, but, since the clearing behavior predates this PR, I'd prefer to add that functionality as a separate PR with a decent amount of manual testing to ensure no regressions.

tool/tsh/tsh_test.go Outdated Show resolved Hide resolved
tool/tsh/tsh_test.go Show resolved Hide resolved
tool/tsh/tsh_test.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
lib/service/service.go Outdated Show resolved Hide resolved
tool/tsh/tsh.go Outdated Show resolved Hide resolved
tool/tsh/tsh_test.go Show resolved Hide resolved
@fspmarshall fspmarshall force-pushed the fspmarshall/test-tsh-oidc branch from 544c129 to b0b0a29 Compare January 26, 2021 19:16
@fspmarshall fspmarshall force-pushed the fspmarshall/test-tsh-oidc branch from b0b0a29 to 08ff453 Compare February 9, 2021 19:39
@fspmarshall fspmarshall force-pushed the fspmarshall/test-tsh-oidc branch from 08ff453 to 46356e6 Compare February 9, 2021 21:18
@fspmarshall fspmarshall merged commit db89206 into master Feb 9, 2021
@fspmarshall fspmarshall deleted the fspmarshall/test-tsh-oidc branch February 9, 2021 21:31
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

Successfully merging this pull request may close these issues.

3 participants