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

Add unit tests for src/lib.rs #53

Merged
merged 1 commit into from
Sep 10, 2021
Merged

Conversation

mjura
Copy link
Collaborator

@mjura mjura commented Sep 10, 2021

No description provided.

@vadorovsky
Copy link
Member

Huh, there is something fishy going on with building the container image. I'll try to fix that.

@vadorovsky
Copy link
Member

Ref: #7

@vadorovsky
Copy link
Member

@mjura #54 should fix your CI error, PTAL

}

#[test]
fn find_lockc_bpf_path_should_return_error() {
Copy link
Member

Choose a reason for hiding this comment

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

Just FYI - I think that to test the correct execution of the find_lockc_bpf_path function, we need to either:

  • somehow mock that function, provide fake files
  • run some tests as root
  • maybe actually doing both?

I will accept your PR now as it is, but it would be nice to go with either of those solutions in the future. I might work on that next week.

@vadorovsky vadorovsky merged commit 34e18c5 into lockc-project:main Sep 10, 2021
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.

2 participants