-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[cli] replace pstree in credential helper #4385
Conversation
/werft run |
/werft run 👍 started the job as gitpod-build-jk-gitpod-extension-warning-4062.1 |
2824282
to
ffe8f20
Compare
/werft run 👍 started the job as gitpod-build-jk-gitpod-extension-warning-4062.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quickly checked with the repo from GH issue and it works as advertised!
The remote repository "https://github.com/icub-tech-iit/documentation.git" is not accessible with the current token. Please grant the necessary permissions.
@JanKoehnlein Is it still work in process? Asking due to the |
Changed the title to reflect that this is ready for review |
func logDebug(v ...interface{}) { | ||
if os.Getenv("CREDENTIAL_HELPER_DEBUG_LOG") == "true" { | ||
log.Println(v...) | ||
func parseProcessTree() (repoUrl string, gitCommand string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we could write some unit tests for this? Not just for the actual test but that would also help to understand the function because we would have a list of some example inputs and expected outputs.
Sure, the problem here is to mock the readProc
function for the test, right? Any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good so far. Haven't tested since Alex has already.
The proposed unit test would be great, though. But since it wasn't there before either, it doesn't get any worse with this change. Therefore no blocker.
The crucial part is to interpret/parse what comes out of |
Fixes #4062