terraform/builtin/providers/docker
Daniel Portella 11b3b7cf29 provider/docker: Fixes for docker_container host object and documentation (#9367)
* Updated docker container documentation

Feedback from ticket #9350 indicated that documentation was out of date

renamed `hosts_entry` to `host`
added correct type information to *Extra Hosts* section.

Refs: 9350

* Fixes for docker_container host object

Feedback from ticket #9350 updated codebase so it reflects the requirements from docker in regards to `host` which is `Required` and not optional.
It now accurately reflects the docker requirements and the terraform documentation.

Test results

> Bear in mind the failure it is because my laptop doesnt support memory swap. So this test will always fail.

Changing the Schema from `optional` to `required` made no difference to the tests.

make testacc TEST=./builtin/providers/docker/
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/14 15:04:40 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/docker/ -v  -timeout 120m
=== RUN   TestAccDockerRegistryImage_basic
--- PASS: TestAccDockerRegistryImage_basic (4.57s)
=== RUN   TestAccDockerRegistryImage_private
--- PASS: TestAccDockerRegistryImage_private (6.22s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (7.16s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (7.37s)
=== RUN   TestAccDockerContainer_customized
--- FAIL: TestAccDockerContainer_customized (18.99s)
	testing.go:265: Step 0 error: Check failed: Check 2/2 error: Container has wrong memory swap setting: -1
	Please check that you machine supports memory swap (you can do that by running 'docker info' command).
=== RUN   TestAccDockerImage_basic
--- PASS: TestAccDockerImage_basic (2.58s)
=== RUN   TestAccDockerImage_private
--- PASS: TestAccDockerImage_private (2.70s)
=== RUN   TestAccDockerImage_destroy
--- PASS: TestAccDockerImage_destroy (30.00s)
=== RUN   TestAccDockerImage_data
--- PASS: TestAccDockerImage_data (5.93s)
=== RUN   TestAccDockerNetwork_basic
--- PASS: TestAccDockerNetwork_basic (0.24s)
=== RUN   TestAccDockerVolume_basic
--- PASS: TestAccDockerVolume_basic (0.05s)
FAIL
exit status 1
FAIL	github.com/hashicorp/terraform/builtin/providers/docker	85.816s
Makefile:47: recipe for target 'testacc' failed
make: *** [testacc] Error 1

Refs: 9350
2016-10-27 10:54:05 +01:00
..
config.go providres/docker: cache client 2015-03-28 18:37:20 -07:00
data_source_docker_registry_image.go provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
data_source_docker_registry_image_test.go provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
provider.go provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
provider_test.go providers/docker: docker_image acceptance test 2015-03-27 15:22:33 -07:00
resource_docker_container.go provider/docker: Fixes for docker_container host object and documentation (#9367) 2016-10-27 10:54:05 +01:00
resource_docker_container_funcs.go Add `destroy_grace_seconds` option to stop container before delete (#7513) 2016-07-11 16:03:02 +01:00
resource_docker_container_test.go Add `destroy_grace_seconds` option to stop container before delete (#7513) 2016-07-11 16:03:02 +01:00
resource_docker_image.go provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
resource_docker_image_funcs.go provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
resource_docker_image_test.go provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
resource_docker_network.go Add support of custom networks in docker 2016-01-02 12:20:55 +01:00
resource_docker_network_funcs.go Add support of custom networks in docker 2016-01-02 12:20:55 +01:00
resource_docker_network_test.go Add support of custom networks in docker 2016-01-02 12:20:55 +01:00
resource_docker_volume.go provider/docker: Add `docker_volume` resource 2016-01-15 17:34:53 +00:00
resource_docker_volume_test.go provider/docker: Add `docker_volume` resource 2016-01-15 17:34:53 +00:00