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

Adapting nss integration tests #59

Merged
merged 21 commits into from Sep 8, 2022
Merged

Conversation

denisonbarbosa
Copy link
Member

Adapting the tests to fit in the new NSS C library.

@denisonbarbosa denisonbarbosa marked this pull request as ready for review September 7, 2022 12:05
@denisonbarbosa denisonbarbosa requested a review from a team as a code owner September 7, 2022 12:05
Copy link
Contributor

@GabrielNagy GabrielNagy left a comment

Choose a reason for hiding this comment

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

Just some nitpicks related to how we build the lib. Happy we got this working \o/

.github/workflows/qa.yaml Outdated Show resolved Hide resolved
.github/workflows/qa.yaml Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
Copy link
Member

@didrocks didrocks left a comment

Choose a reason for hiding this comment

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

Some small comments, but overall, this is great!

Please double check again that all previous tests cases are still covered with the refactoring, I saw at least that those one are not: try to list by name or uid in group and passwd without access to shadow.

Also, we discussed on MM about listing the group. I doubt this is a buffer issue, we can check together.

.github/workflows/qa.yaml Outdated Show resolved Hide resolved
nss/aad-auth/aadauth_test.go Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
nss/db_override.c Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
nss/aad-auth/helper_test.go Outdated Show resolved Hide resolved
denisonbarbosa and others added 12 commits September 7, 2022 12:19
Added test cases to handle calls to Getent with "" keys.

Co-authored by: Didier Roche <didrocks@ubuntu.com>
Now the call to outNssCommandForLib actually returns all the entries, as
requested.
Also addressed a few other comments in the PR.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Now it's possible to pass an explicit empty key ("") to the aad-auth cli
and have it perform the same operation as getent would -> query the
database for the "" key, rather than treating it as a nil value.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
@codecov-commenter
Copy link

Codecov Report

Merging #59 (114743a) into main (5e81277) will increase coverage by 6.78%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   75.98%   82.76%   +6.78%     
==========================================
  Files          39       34       -5     
  Lines        2436     2234     -202     
==========================================
- Hits         1851     1849       -2     
+ Misses        524      324     -200     
  Partials       61       61              
Impacted Files Coverage Δ
nss/aad-auth/main.go 0.00% <0.00%> (ø)
nss/aad-auth/getent.go 99.12% <100.00%> (-0.02%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@didrocks didrocks left a comment

Choose a reason for hiding this comment

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

All comments are resolved! Good work, it’s reassuring to have integration tests back!

@denisonbarbosa denisonbarbosa merged commit ff7b1fe into main Sep 8, 2022
@denisonbarbosa denisonbarbosa deleted the adapting-nss-integration-tests branch September 8, 2022 16:03
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.

None yet

4 participants