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

libgit2: Enable tests #744

Merged
merged 1 commit into from
May 29, 2022
Merged

libgit2: Enable tests #744

merged 1 commit into from
May 29, 2022

Conversation

darkowlzz
Copy link
Contributor

TestMain() without m.Run() resulted in none of the tests being run.

This libgit2 package contains tests for both managed and unmanaged
transports, enabling it in TestMain() for everything results in the
unmanaged transport tests to not run. Add managed transport
initialization call to all the managed transport tests to allow
unmanaged transport tests to run.

Refer: https://github.com/fluxcd/source-controller/pull/727/files#r884158741

@darkowlzz darkowlzz added area/git Git related issues and pull requests area/testing Testing related issues and pull requests labels May 28, 2022
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @darkowlzz

TestMain() without m.Run() resulted in none of the tests being run.

This libgit2 package contains tests for both managed and unmanaged
transports, enabling it in TestMain() for everything results in the
unmanaged transport tests to not run. Add managed transport
initialization call to all the managed transport tests to allow
unmanaged transport tests to run.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

Nice one @darkowlzz!

LGTM

@darkowlzz darkowlzz merged commit 9d6eada into main May 29, 2022
@darkowlzz darkowlzz deleted the libgit2-enable-tests branch May 29, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git related issues and pull requests area/testing Testing related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants