Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

d/kubernetes_service: fix broken schema #159

Merged
merged 1 commit into from
Apr 27, 2018
Merged

d/kubernetes_service: fix broken schema #159

merged 1 commit into from
Apr 27, 2018

Conversation

appilon
Copy link
Contributor

@appilon appilon commented Apr 27, 2018

switch target_port to string

This broke from another PR
BEFORE:

=== RUN   TestAccKubernetesDataSourceService_basic
--- FAIL: TestAccKubernetesDataSourceService_basic (0.89s)
	testing.go:518: Step 0 error: Error applying: 1 error(s) occurred:

		* data.kubernetes_service.test: data.kubernetes_service.test: spec.0.port.0.target_port: '' expected type 'int', got unconvertible type 'string'
	testing.go:579: Error destroying resource! WARNING: Dangling resources
		may exist. The full state and error is shown below.

		Error: Error refreshing: 1 error(s) occurred:

		* data.kubernetes_service.test: 1 error(s) occurred:

		* data.kubernetes_service.test: data.kubernetes_service.test: spec.0.port.0.target_port: '' expected type 'int', got unconvertible type 'string'

		State: <nil>

AFTER

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./kubernetes -v -run=TestAccKubernetesDataSourceService_basic -timeout 120m
=== RUN   TestAccKubernetesDataSourceService_basic
--- PASS: TestAccKubernetesDataSourceService_basic (1.26s)
PASS
ok  	github.com/terraform-providers/terraform-provider-kubernetes/kubernetes	1.355s

@appilon appilon requested a review from a team April 27, 2018 00:00
@radeksimko
Copy link
Member

It would be nice to add an acceptance test which fails without this patch.

@appilon
Copy link
Contributor Author

appilon commented Apr 27, 2018

@radeksimko the test I show passing was actually broken I just did not realize it until I ran the full suite of tests. I've updated the description with BEFORE and AFTER

@appilon appilon merged commit 8508d27 into hashicorp:master Apr 27, 2018
@ghost ghost locked and limited conversation to collaborators Apr 21, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants