-
Notifications
You must be signed in to change notification settings - Fork 770
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
Kayrus optional parameters #255
Conversation
…form-provider-github into kayrus-optional-parameters
@@ -90,6 +102,59 @@ func TestProvider_individual(t *testing.T) { | |||
Config: individualProviderConfig + testAccGithubMembershipConfig(username), | |||
ExpectError: regexp.MustCompile("This resource requires GitHub organization to be set on the provider."), | |||
}, | |||
{ | |||
Config: conflictingProviderConfig + testAccCheckGithubUserDataSourceConfig(username), | |||
ExpectError: regexp.MustCompile("If `individual` is true, `organization` cannot be set."), |
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.
Does this test pass? conflictingProviderConfig
, from what I can see, only sets individual
to true
, it doesn't set an organization.
github/provider_test.go
Outdated
` | ||
|
||
neitherProviderConfig := `provider "github" { | ||
organization = "" |
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.
I think the more common user scenario, and the one we should probably be testing for, is that they didn't specify organization at all, rather than setting it to an empty 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.
@paddycarver I agree, however, the rest of the tests need GITHUB_ORGANIZATION defined, so, when running the suite it will already be there, this will override that. Is there a better way to do this?
@megan07 when are you going to make the release with this feature? |
Addressing #230, #205, and #190 where GITHUB_TOKEN should not be required for all data sources.
Before fix:
After fix: