Skip to content

Kayrus optional parameters - #255

Merged
megan07 merged 9 commits into
masterfrom
kayrus-optional-parameters
Jul 22, 2019
Merged

megan07 merged 9 commits into
masterfrom
kayrus-optional-parameters

Conversation

@megan07

@megan07 megan07 commented Jul 10, 2019

Copy link
Copy Markdown
Contributor

Addressing #230, #205, and #190 where GITHUB_TOKEN should not be required for all data sources.
Before fix:

        Error: GET https://api.github.com/users/hashibot: 401 Bad credentials []

          on /var/folders/nj/n5hr70hd2dx45qb__6wl10nc0000gp/T/tf-test353694711/main.tf line 6:
          (source code not available)


FAIL

After fix:

== RUN   TestProvider_anonymous
--- PASS: TestProvider_anonymous (1.04s)
PASS

@ghost ghost added size/M Type: Documentation Improvements or additions to documentation labels Jul 10, 2019
@megan07
megan07 requested a review from a team July 10, 2019 17:18
Comment thread github/provider.go Resolved
Comment thread github/provider.go Resolved
Comment thread github/provider_test.go
},
{
Config: conflictingProviderConfig + testAccCheckGithubUserDataSourceConfig(username),
ExpectError: regexp.MustCompile("If `individual` is true, `organization` cannot be set."),

Copy link
Copy Markdown
Contributor

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.

Comment thread github/provider_test.go Outdated
`

neitherProviderConfig := `provider "github" {
organization = ""

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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?

@ghost ghost added size/L and removed size/M labels Jul 16, 2019
@kayrus

kayrus commented Aug 8, 2019

Copy link
Copy Markdown

@megan07 when are you going to make the release with this feature?

@radeksimko
radeksimko deleted the kayrus-optional-parameters branch November 25, 2019 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Type: Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants