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

Remove the flags attribute in consul_license #227

Merged
merged 2 commits into from
Sep 14, 2020

Conversation

remilapeyre
Copy link
Contributor

Since this just removes an attribute it does not need a StateUpgrader.

Closes #223

Since this just removes an attribute it does not need a StateUpgrader.

Closes hashicorp#223
Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

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

I think there might be an issue here:

I ran the TestAccConsulLicense_CorrectLicense test locally and it paniced. I am not entirely sure its not my setup though:

=== RUN   TestAccConsulLicense_CorrectLicense
--- FAIL: TestAccConsulLicense_CorrectLicense (0.00s)
panic: interface conversion: interface {} is nil, not *consul.Config [recovered]
        panic: interface conversion: interface {} is nil, not *consul.Config

goroutine 21 [running]:
testing.tRunner.func1.1(0x1d8f7c0, 0xc0004e05a0)
        /usr/local/go/src/testing/testing.go:941 +0x3d0
testing.tRunner.func1(0xc0003f70e0)
        /usr/local/go/src/testing/testing.go:944 +0x3f9
panic(0x1d8f7c0, 0xc0004e05a0)
        /usr/local/go/src/runtime/panic.go:967 +0x166
github.com/hashicorp/terraform-provider-consul/consul.getClient(...)
        /Users/mkeeler/Code/repos/terraform-provider-consul/consul/resource_provider.go:162
github.com/hashicorp/terraform-provider-consul/consul.serverIsConsulCommunityEdition(0xc0003f70e0, 0x2ad3e20)
        /Users/mkeeler/Code/repos/terraform-provider-consul/consul/resource_consul_license_test.go:62 +0x1f8
github.com/hashicorp/terraform-provider-consul/consul.skipTestOnConsulCommunityEdition(0xc0003f70e0)
        /Users/mkeeler/Code/repos/terraform-provider-consul/consul/resource_consul_license_test.go:73 +0x3d
github.com/hashicorp/terraform-provider-consul/consul.TestAccConsulLicense_CorrectLicense.func1()
        /Users/mkeeler/Code/repos/terraform-provider-consul/consul/resource_consul_license_test.go:42 +0x33
github.com/hashicorp/terraform-plugin-sdk/helper/resource.Test(0x2200f40, 0xc0003f70e0, 0x0, 0xc000185e28, 0xc0004e0450, 0x0, 0x0, 0x0, 0xc000185ea8, 0x1, ...)
        /Users/mkeeler/.go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.0.0/helper/resource/testing.go:482 +0x178f
github.com/hashicorp/terraform-provider-consul/consul.TestAccConsulLicense_CorrectLicense(0xc0003f70e0)
        /Users/mkeeler/Code/repos/terraform-provider-consul/consul/resource_consul_license_test.go:40 +0x296
testing.tRunner(0xc0003f70e0, 0x1f7a6c8)
        /usr/local/go/src/testing/testing.go:992 +0xdc
created by testing.(*T).Run
        /usr/local/go/src/testing/testing.go:1043 +0x357
FAIL    github.com/hashicorp/terraform-provider-consul/consul   0.455s
FAIL

Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

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

Apparently I was running the tests incorrectly resulting in the panic (cannot run individual tests)

@remilapeyre remilapeyre merged commit 09c2814 into hashicorp:master Sep 14, 2020
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.

Applying enterprise consul_license resource results in error
2 participants