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

Fix nil pointer dereference in data.azuread_users and improve test coverage #289

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

manicminer
Copy link
Contributor

@manicminer manicminer commented Jun 30, 2020

…verage for singular and plural user data sources
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM :rock

@patrickmarabeas
Copy link
Contributor

Can confirm it's functioning as expected now 👍

@manicminer
Copy link
Contributor Author

Test results:

Screenshot 2020-07-01 02 41 23
Screenshot 2020-07-01 02 41 42

@manicminer manicminer merged commit 7006edb into master Jul 1, 2020
@manicminer manicminer deleted the user/nil-pointer-deref-and-tests branch July 1, 2020 01:42
@patrickmarabeas
Copy link
Contributor

@manicminer I take it back. It seems as though when one user errors, it exits the loop at that point. Given:

[ 
  "realuser1",
  "realuser2",
  "realuser3",  
  "zzzzzz",
]

The result is expected. However, given:

[
  "aaaaaa",
  "realuser1",
  "realuser2",
  "realuser3",  
]

No users are returned.

Can you confirm you are seeing the same result?

@patrickmarabeas
Copy link
Contributor

patrickmarabeas commented Jul 3, 2020

Oh, *face-palm. It should be continue not break.

I'll raise a fix.

@manicminer
Copy link
Contributor Author

@patrickmarabeas thanks for testing and for the fix - as soon as I read your comment I realised that loop should have continued :)

@ghost
Copy link

ghost commented Jul 9, 2020

This has been released in version 0.11.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azuread" {
    version = "~> 0.11.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jul 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants