Skip to content

Instantly share code, notes, and snippets.

@radeksimko
Created May 10, 2017 20:20
Show Gist options
  • Save radeksimko/ee386a97e5cd809fe44b03fe373c1265 to your computer and use it in GitHub Desktop.
Save radeksimko/ee386a97e5cd809fe44b03fe373c1265 to your computer and use it in GitHub Desktop.
make testacc TEST=./builtin/providers/kubernetes TESTARGS='-run=TestAccKubernetesPod_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/10 22:18:14 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/kubernetes -v -run=TestAccKubernetesPod_ -timeout 120m
=== RUN TestAccKubernetesPod_basic
--- FAIL: TestAccKubernetesPod_basic (17.69s)
testing.go:280: Step 0 error: After applying this step, the plan was not empty:
DIFF:
DESTROY/CREATE: kubernetes_pod.test
metadata.#: "1" => "1"
metadata.0.generation: "0" => "<computed>"
metadata.0.labels.%: "1" => "1"
metadata.0.labels.app: "pod_label" => "pod_label"
metadata.0.name: "tf-acc-test-aa870b7go0" => "tf-acc-test-aa870b7go0"
metadata.0.namespace: "default" => "default"
metadata.0.resource_version: "6014" => "<computed>"
metadata.0.self_link: "/api/v1/namespaces/default/pods/tf-acc-test-aa870b7go0" => "<computed>"
metadata.0.uid: "d1a27881-35bd-11e7-b0ef-42010a8a0004" => "<computed>"
spec.#: "1" => "1"
spec.0.containers.#: "1" => "1"
spec.0.containers.0.env.#: "2" => "2"
spec.0.containers.0.env.0.name: "EXPORTED_VARIBALE_FROM_SECRET" => "EXPORTED_VARIBALE_FROM_SECRET"
spec.0.containers.0.env.0.value_from.#: "1" => "1"
spec.0.containers.0.env.0.value_from.0.secret_key_ref.#: "1" => "1"
spec.0.containers.0.env.0.value_from.0.secret_key_ref.0.key: "one" => "one"
spec.0.containers.0.env.0.value_from.0.secret_key_ref.0.name: "tf-acc-test-i1mz4jcud9" => "tf-acc-test-i1mz4jcud9"
spec.0.containers.0.env.1.name: "EXPORTED_VARIBALE_FROM_CONFIG_MAP" => "EXPORTED_VARIBALE_FROM_CONFIG_MAP"
spec.0.containers.0.env.1.value_from.#: "1" => "1"
spec.0.containers.0.env.1.value_from.0.config_map_key_ref.#: "1" => "1"
spec.0.containers.0.env.1.value_from.0.config_map_key_ref.0.key: "one" => "one"
spec.0.containers.0.env.1.value_from.0.config_map_key_ref.0.name: "tf-acc-test-uf3td8flnd" => "tf-acc-test-uf3td8flnd"
spec.0.containers.0.image: "nginx:1.7.9" => "nginx:1.7.9"
spec.0.containers.0.image_pull_policy: "IfNotPresent" => "<computed>"
spec.0.containers.0.name: "containername" => "containername"
spec.0.containers.0.resources.#: "1" => "0" (forces new resource)
spec.0.containers.0.resources.0.requests.%: "1" => "0"
spec.0.containers.0.resources.0.requests.cpu: "100m" => ""
spec.0.containers.0.stdin: "false" => "false"
spec.0.containers.0.stdin_once: "false" => "false"
spec.0.containers.0.tty: "false" => "false"
spec.0.dns_policy: "ClusterFirst" => "ClusterFirst"
spec.0.host_ipc: "false" => "false"
spec.0.host_network: "false" => "false"
spec.0.host_pid: "false" => "false"
spec.0.hostname: "" => "<computed>"
spec.0.node_name: "*REDACTED*-sa-default-pool-7f46e728-d6pr" => "<computed>"
spec.0.restart_policy: "Always" => "Always"
spec.0.service_account_name: "default" => "<computed>"
spec.0.termination_grace_period_seconds: "30" => "30"
spec.0.volumes.#: "1" => "1"
spec.0.volumes.0.name: "db" => "db"
spec.0.volumes.0.secret.#: "1" => "1"
spec.0.volumes.0.secret.0.secret_name: "tf-acc-test-i1mz4jcud9" => "tf-acc-test-i1mz4jcud9"
STATE:
kubernetes_config_map.test:
ID = default/tf-acc-test-uf3td8flnd
data.% = 1
data.one = ONE
metadata.# = 1
metadata.0.annotations.% = 0
metadata.0.generate_name =
metadata.0.generation = 0
metadata.0.labels.% = 0
metadata.0.name = tf-acc-test-uf3td8flnd
metadata.0.namespace = default
metadata.0.resource_version = 5993
metadata.0.self_link = /api/v1/namespaces/default/configmaps/tf-acc-test-uf3td8flnd
metadata.0.uid = d160935b-35bd-11e7-b0ef-42010a8a0004
kubernetes_pod.test:
ID = default/tf-acc-test-aa870b7go0
metadata.# = 1
metadata.0.annotations.% = 0
metadata.0.generate_name =
metadata.0.generation = 0
metadata.0.labels.% = 1
metadata.0.labels.app = pod_label
metadata.0.name = tf-acc-test-aa870b7go0
metadata.0.namespace = default
metadata.0.resource_version = 6014
metadata.0.self_link = /api/v1/namespaces/default/pods/tf-acc-test-aa870b7go0
metadata.0.uid = d1a27881-35bd-11e7-b0ef-42010a8a0004
spec.# = 1
spec.0.active_deadline_seconds = 0
spec.0.containers.# = 1
spec.0.containers.0.args.# = 0
spec.0.containers.0.command.# = 0
spec.0.containers.0.env.# = 2
spec.0.containers.0.env.0.name = EXPORTED_VARIBALE_FROM_SECRET
spec.0.containers.0.env.0.value =
spec.0.containers.0.env.0.value_from.# = 1
spec.0.containers.0.env.0.value_from.0.config_map_key_ref.# = 0
spec.0.containers.0.env.0.value_from.0.field_ref.# = 0
spec.0.containers.0.env.0.value_from.0.resource_field_ref.# = 0
spec.0.containers.0.env.0.value_from.0.secret_key_ref.# = 1
spec.0.containers.0.env.0.value_from.0.secret_key_ref.0.key = one
spec.0.containers.0.env.0.value_from.0.secret_key_ref.0.name = tf-acc-test-i1mz4jcud9
spec.0.containers.0.env.1.name = EXPORTED_VARIBALE_FROM_CONFIG_MAP
spec.0.containers.0.env.1.value =
spec.0.containers.0.env.1.value_from.# = 1
spec.0.containers.0.env.1.value_from.0.config_map_key_ref.# = 1
spec.0.containers.0.env.1.value_from.0.config_map_key_ref.0.key = one
spec.0.containers.0.env.1.value_from.0.config_map_key_ref.0.name = tf-acc-test-uf3td8flnd
spec.0.containers.0.env.1.value_from.0.field_ref.# = 0
spec.0.containers.0.env.1.value_from.0.resource_field_ref.# = 0
spec.0.containers.0.env.1.value_from.0.secret_key_ref.# = 0
spec.0.containers.0.image = nginx:1.7.9
spec.0.containers.0.image_pull_policy = IfNotPresent
spec.0.containers.0.lifecycle.# = 0
spec.0.containers.0.liveness_probe.# = 0
spec.0.containers.0.name = containername
spec.0.containers.0.ports.# = 0
spec.0.containers.0.readiness_probe.# = 0
spec.0.containers.0.resources.# = 1
spec.0.containers.0.resources.0.limits.% = 0
spec.0.containers.0.resources.0.requests.% = 1
spec.0.containers.0.resources.0.requests.cpu = 100m
spec.0.containers.0.security_context.# = 0
spec.0.containers.0.stdin = false
spec.0.containers.0.stdin_once = false
spec.0.containers.0.termination_message_path =
spec.0.containers.0.tty = false
spec.0.containers.0.volume_mounts.# = 0
spec.0.containers.0.working_dir =
spec.0.dns_policy = ClusterFirst
spec.0.host_ipc = false
spec.0.host_network = false
spec.0.host_pid = false
spec.0.hostname =
spec.0.image_pull_secrets.# = 0
spec.0.node_name = *REDACTED*-sa-default-pool-7f46e728-d6pr
spec.0.node_selector.% = 0
spec.0.restart_policy = Always
spec.0.security_context.# = 0
spec.0.service_account_name = default
spec.0.subdomain =
spec.0.termination_grace_period_seconds = 30
spec.0.volumes.# = 1
spec.0.volumes.0.aws_elastic_block_store.# = 0
spec.0.volumes.0.azure_disk.# = 0
spec.0.volumes.0.azure_file.# = 0
spec.0.volumes.0.ceph_fs.# = 0
spec.0.volumes.0.cinder.# = 0
spec.0.volumes.0.fc.# = 0
spec.0.volumes.0.flex_volume.# = 0
spec.0.volumes.0.flocker.# = 0
spec.0.volumes.0.gce_persistent_disk.# = 0
spec.0.volumes.0.glusterfs.# = 0
spec.0.volumes.0.host_path.# = 0
spec.0.volumes.0.iscsi.# = 0
spec.0.volumes.0.name = db
spec.0.volumes.0.nfs.# = 0
spec.0.volumes.0.persistent_volume_claim.# = 0
spec.0.volumes.0.photon_persistent_disk.# = 0
spec.0.volumes.0.quobyte.# = 0
spec.0.volumes.0.rbd.# = 0
spec.0.volumes.0.secret.# = 1
spec.0.volumes.0.secret.0.secret_name = tf-acc-test-i1mz4jcud9
spec.0.volumes.0.vsphere_volume.# = 0
Dependencies:
kubernetes_config_map.test
kubernetes_secret.test
kubernetes_secret.test:
ID = default/tf-acc-test-i1mz4jcud9
data.% = 1
data.one = first
metadata.# = 1
metadata.0.annotations.% = 0
metadata.0.generate_name =
metadata.0.generation = 0
metadata.0.labels.% = 0
metadata.0.name = tf-acc-test-i1mz4jcud9
metadata.0.namespace = default
metadata.0.resource_version = 5992
metadata.0.self_link = /api/v1/namespaces/default/secrets/tf-acc-test-i1mz4jcud9
metadata.0.uid = d1609b81-35bd-11e7-b0ef-42010a8a0004
type = Opaque
=== RUN TestAccKubernetesPod_with_pod_security_context
--- FAIL: TestAccKubernetesPod_with_pod_security_context (16.02s)
testing.go:280: Step 0 error: After applying this step, the plan was not empty:
DIFF:
DESTROY/CREATE: kubernetes_pod.test
metadata.#: "1" => "1"
metadata.0.generation: "0" => "<computed>"
metadata.0.labels.%: "1" => "1"
metadata.0.labels.app: "pod_label" => "pod_label"
metadata.0.name: "tf-acc-test-jkgccx6fu6" => "tf-acc-test-jkgccx6fu6"
metadata.0.namespace: "default" => "default"
metadata.0.resource_version: "6047" => "<computed>"
metadata.0.self_link: "/api/v1/namespaces/default/pods/tf-acc-test-jkgccx6fu6" => "<computed>"
metadata.0.uid: "db8e48e3-35bd-11e7-b0ef-42010a8a0004" => "<computed>"
spec.#: "1" => "1"
spec.0.containers.#: "1" => "1"
spec.0.containers.0.image: "nginx:1.7.9" => "nginx:1.7.9"
spec.0.containers.0.image_pull_policy: "IfNotPresent" => "<computed>"
spec.0.containers.0.name: "containername" => "containername"
spec.0.containers.0.resources.#: "1" => "0" (forces new resource)
spec.0.containers.0.resources.0.requests.%: "1" => "0"
spec.0.containers.0.resources.0.requests.cpu: "100m" => ""
spec.0.containers.0.stdin: "false" => "false"
spec.0.containers.0.stdin_once: "false" => "false"
spec.0.containers.0.tty: "false" => "false"
spec.0.dns_policy: "ClusterFirst" => "ClusterFirst"
spec.0.host_ipc: "false" => "false"
spec.0.host_network: "false" => "false"
spec.0.host_pid: "false" => "false"
spec.0.hostname: "" => "<computed>"
spec.0.node_name: "*REDACTED*-sa-default-pool-137c719d-p94q" => "<computed>"
spec.0.restart_policy: "Always" => "Always"
spec.0.security_context.#: "1" => "1"
spec.0.security_context.0.run_as_non_root: "true" => "true"
spec.0.security_context.0.supplemental_groups.#: "1" => "1"
spec.0.security_context.0.supplemental_groups.988695518: "101" => "101"
spec.0.service_account_name: "default" => "<computed>"
spec.0.termination_grace_period_seconds: "30" => "30"
STATE:
kubernetes_pod.test:
ID = default/tf-acc-test-jkgccx6fu6
metadata.# = 1
metadata.0.annotations.% = 0
metadata.0.generate_name =
metadata.0.generation = 0
metadata.0.labels.% = 1
metadata.0.labels.app = pod_label
metadata.0.name = tf-acc-test-jkgccx6fu6
metadata.0.namespace = default
metadata.0.resource_version = 6047
metadata.0.self_link = /api/v1/namespaces/default/pods/tf-acc-test-jkgccx6fu6
metadata.0.uid = db8e48e3-35bd-11e7-b0ef-42010a8a0004
spec.# = 1
spec.0.active_deadline_seconds = 0
spec.0.containers.# = 1
spec.0.containers.0.args.# = 0
spec.0.containers.0.command.# = 0
spec.0.containers.0.env.# = 0
spec.0.containers.0.image = nginx:1.7.9
spec.0.containers.0.image_pull_policy = IfNotPresent
spec.0.containers.0.lifecycle.# = 0
spec.0.containers.0.liveness_probe.# = 0
spec.0.containers.0.name = containername
spec.0.containers.0.ports.# = 0
spec.0.containers.0.readiness_probe.# = 0
spec.0.containers.0.resources.# = 1
spec.0.containers.0.resources.0.limits.% = 0
spec.0.containers.0.resources.0.requests.% = 1
spec.0.containers.0.resources.0.requests.cpu = 100m
spec.0.containers.0.security_context.# = 0
spec.0.containers.0.stdin = false
spec.0.containers.0.stdin_once = false
spec.0.containers.0.termination_message_path =
spec.0.containers.0.tty = false
spec.0.containers.0.volume_mounts.# = 0
spec.0.containers.0.working_dir =
spec.0.dns_policy = ClusterFirst
spec.0.host_ipc = false
spec.0.host_network = false
spec.0.host_pid = false
spec.0.hostname =
spec.0.image_pull_secrets.# = 0
spec.0.node_name = *REDACTED*-sa-default-pool-137c719d-p94q
spec.0.node_selector.% = 0
spec.0.restart_policy = Always
spec.0.security_context.# = 1
spec.0.security_context.0.fs_group = 0
spec.0.security_context.0.run_as_non_root = true
spec.0.security_context.0.run_as_user = 0
spec.0.security_context.0.se_linux_options.# = 0
spec.0.security_context.0.supplemental_groups.# = 1
spec.0.security_context.0.supplemental_groups.988695518 = 101
spec.0.service_account_name = default
spec.0.subdomain =
spec.0.termination_grace_period_seconds = 30
spec.0.volumes.# = 0
FAIL
exit status 1
FAIL github.com/hashicorp/terraform/builtin/providers/kubernetes 33.791s
make: *** [testacc] Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment