Skip to content

Instantly share code, notes, and snippets.

@lilithmooncohen
Created September 5, 2018 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lilithmooncohen/1663101eefdff5dfd83650837b1f015d to your computer and use it in GitHub Desktop.
Save lilithmooncohen/1663101eefdff5dfd83650837b1f015d to your computer and use it in GitHub Desktop.
➜ make test_integration
./test/integration/gcloud/run.sh
Creating main.tf file
Creating outputs.tf file
Fetching https://github.com/terraform-google-modules/kitchen-inspec.git
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/.
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using public_suffix 3.0.3 (was 3.0.2)
Using addressable 2.5.2
Using aws-sigv4 1.0.3
Using jmespath 1.4.0
Using aws-sdk-core 2.11.123 (was 2.11.107)
Using aws-sdk-resources 2.11.123 (was 2.11.107)
Using aws-sdk 2.11.123 (was 2.11.107)
Using concurrent-ruby 1.0.5
Using multipart-post 2.0.0
Using faraday 0.15.2
Using unf_ext 0.0.7.5
Using unf 0.1.4
Using domain_name 0.5.20180417
Using http-cookie 1.0.3
Using faraday-cookie_jar 0.0.6
Using timeliness 0.3.8
Using ms_rest 0.7.2
Using ms_rest_azure 0.11.0
Using azure_graph_rbac 0.17.0
Using azure_mgmt_resources 0.17.0
Using builder 3.2.3
Using bundler 1.16.3
Using coderay 1.1.2
Using declarative 0.0.10
Using declarative-option 0.1.0
Using diff-lcs 1.3
Using excon 0.62.0
Using multi_json 1.13.1
Using docker-api 1.34.2
Using dry-configurable 0.7.0
Using dry-container 0.6.0
Using dry-core 0.4.7
Using dry-equalizer 0.2.1
Using dry-inflector 0.1.2
Using dry-logic 0.4.2
Using dry-types 0.13.2
Using dry-validation 0.12.1
Using erubis 2.7.0
Using faraday_middleware 0.12.2
Using ffi 1.9.25
Using jwt 2.1.0
Using memoist 0.16.0
Using os 1.0.0
Using signet 0.9.1 (was 0.8.1)
Using googleauth 0.6.6 (was 0.6.4)
Using httpclient 2.8.3
Using mime-types-data 3.2018.0812
Using mime-types 3.2.2
Using uber 0.1.0
Using representable 3.0.4
Using retriable 3.1.2
Using google-api-client 0.19.8
Using gssapi 1.2.0
Using gyoku 1.3.1
Using hashie 3.6.0
Using htmlentities 4.3.4
Using inifile 3.0.0
Using json 2.1.0
Using method_source 0.9.0
Using mixlib-log 2.0.4
Using parallel 1.12.1
Using parslet 1.8.2
Using pry 0.11.3
Using rspec-support 3.8.0
Using rspec-core 3.8.0
Using rspec-expectations 3.8.1
Using rspec-mocks 3.8.0
Using rspec 3.8.0
Using rspec-its 1.2.0
Using rubyzip 1.2.1
Using semverse 2.0.0
Using sslshake 1.2.0
Using thor 0.20.0
Using tomlrb 1.2.7
Using mixlib-shellout 2.4.0
Using net-ssh 4.2.0
Using net-scp 1.2.1
Using little-plugger 1.1.4
Using logging 2.2.2
Using nori 2.6.0
Using rubyntlm 0.6.2
Using winrm 2.2.3
Using winrm-fs 1.2.1
Using train 1.4.35 (was 1.4.25)
Using inspec 2.2.78 (was 2.2.61)
Using mixlib-versioning 1.2.2
Using mixlib-install 3.11.5
Using net-ssh-gateway 1.3.0
Using winrm-elevated 1.1.0
Using test-kitchen 1.23.2
Using kitchen-inspec 0.23.1 from https://github.com/terraform-google-modules/kitchen-inspec.git (at master@b3440bc)
Using kitchen-terraform 3.3.1
Bundle complete! 2 Gemfile dependencies, 92 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
-----> Starting Kitchen (v1.23.2)
$$$$$$ Running command `terraform version`
Terraform v0.11.7
Your version of Terraform is out of date! The latest version
is 0.11.8. You can update by downloading from www.terraform.io/downloads.html
$$$$$$ Terraform v0.11.7 is supported
-----> Creating <default-local>...
$$$$$$ Running command `terraform init -input=false -lock=true -lock-timeout=0s -upgrade -force-copy -backend=true -get=true -get-plugins=true -verify-plugins=true <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp`
Upgrading modules...
- module.datastore
Updating source "../../../"
Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "local" (1.1.0)...
- Downloading plugin for provider "null" (1.0.0)...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.local: version = "~> 1.1"
* provider.null: version = "~> 1.0"
Terraform has been successfully initialized!
$$$$$$ Running command `terraform workspace select kitchen-terraform-default-local`
Workspace "kitchen-terraform-default-local" doesn't exist.
You can create this workspace with the "new" subcommand.
$$$$$$ Running command `terraform workspace new kitchen-terraform-default-local`
Created and switched to workspace "kitchen-terraform-default-local"!
You're now on a new, empty workspace. Workspaces isolate their state,
so if you run "terraform plan" Terraform will not see any existing state
for this configuration.
Finished creating <default-local> (0m34.70s).
-----> Kitchen is finished. (0m37.07s)
-----> Starting Kitchen (v1.23.2)
$$$$$$ Running command `terraform version`
Terraform v0.11.7
+ provider.google (unversioned)
+ provider.local v1.1.0
+ provider.null v1.0.0
Your version of Terraform is out of date! The latest version
is 0.11.8. You can update by downloading from www.terraform.io/downloads.html
$$$$$$ Terraform v0.11.7 is supported
-----> Converging <default-local>...
$$$$$$ Running command `terraform workspace select kitchen-terraform-default-local`
$$$$$$ Running command `terraform get -update <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp`
- module.datastore
Updating source "../../../"
$$$$$$ Running command `terraform validate -check-variables=true <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp`
$$$$$$ Running command `terraform apply -lock=true -lock-timeout=0s -input=false -auto-approve=true -parallelism=10 -refresh=true <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp`
module.datastore.local_file.cloud-datastore-index-file: Creating...
content: "" => "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed toin writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nindexes:\n\n- kind: Task\n ancestor: no\n properties:\n - name: done\n - name: priority\n direction: desc\n\n- kind: Task\n properties:\n - name: collaborators\n direction: asc\n - name: created\n direction: desc\n"
filename: "" => "<MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/.terraform/modules/f44810a4a4f427d848d1bf00b11690e7/tmp/index.yaml"
module.datastore.local_file.cloud-datastore-index-file: Creation complete after 0s (ID: 087712ad531b642a3f898a9e704113d8ea8d9e0b)
module.datastore.null_resource.gcloud-activate-service-account: Creating...
triggers.%: "" => "1"
triggers.changes_in_index_file: "" => "087712ad531b642a3f898a9e704113d8ea8d9e0b"
module.datastore.null_resource.cloud-datastore-indices: Creating...
triggers.%: "" => "1"
triggers.changes_in_index_file: "" => "69adf2deba287fc26757b5997cd3ed1313105cd6"
module.datastore.null_resource.gcloud-activate-service-account: Provisioning with 'local-exec'...
module.datastore.null_resource.cloud-datastore-indices: Provisioning with 'local-exec'...
module.datastore.null_resource.gcloud-activate-service-account (local-exec): Executing: ["/bin/sh" "-c" "gcloud auth activate-service-account --key-file=<SA_KEY_PATH>"]
module.datastore.null_resource.cloud-datastore-indices (local-exec): Executing: ["/bin/sh" "-c" "gcloud datastore cleanup-indexes <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/.terraform/modules/f44810a4a4f427d848d1bf00b11690e7/tmp/index.yaml --project=<PROJECT_ID>"]
module.datastore.null_resource.cloud-datastore-indices (local-exec): WARNING: `cleanup-indexes` is deprecated. Please use `gcloud datastore indexes cleanup` instead.
module.datastore.null_resource.cloud-datastore-indices (local-exec): Configurations to update:
module.datastore.null_resource.cloud-datastore-indices (local-exec): descriptor: [<MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/.terraform/modules/f44810a4a4f427d848d1bf00b11690e7/tmp/index.yaml]
module.datastore.null_resource.cloud-datastore-indices (local-exec): type: [datastore indexes]
module.datastore.null_resource.cloud-datastore-indices (local-exec): target project: [<PROJECT_ID>]
module.datastore.null_resource.cloud-datastore-indices (local-exec): Do you want to continue (Y/n)?
module.datastore.null_resource.gcloud-activate-service-account (local-exec): Activated service account credentials for: [<SA_ID>]
module.datastore.null_resource.gcloud-activate-service-account: Creation complete after 1s (ID: 2135147794730009794)
module.datastore.null_resource.cloud-datastore-indices: Provisioning with 'local-exec'...
module.datastore.null_resource.cloud-datastore-indices (local-exec): Executing: ["/bin/sh" "-c" "gcloud datastore create-indexes <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/.terraform/modules/f44810a4a4f427d848d1bf00b11690e7/tmp/index.yaml --project=<PROJECT_ID>"]
module.datastore.null_resource.cloud-datastore-indices (local-exec): WARNING: `create-indexes` is deprecated. Please use `gcloud datastore indexes create` instead.
module.datastore.null_resource.cloud-datastore-indices (local-exec): Configurations to update:
module.datastore.null_resource.cloud-datastore-indices (local-exec): descriptor: [<MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/.terraform/modules/f44810a4a4f427d848d1bf00b11690e7/tmp/index.yaml]
module.datastore.null_resource.cloud-datastore-indices (local-exec): type: [datastore indexes]
module.datastore.null_resource.cloud-datastore-indices (local-exec): target project: [<PROJECT_ID>]
module.datastore.null_resource.cloud-datastore-indices (local-exec): Do you want to continue (Y/n)?
module.datastore.null_resource.cloud-datastore-indices: Creation complete after 5s (ID: 354355332349398393)
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
$$$$$$ Running command `terraform output -json`
The state file either has no outputs defined, or all the defined
outputs are empty. Please define an output in your configuration
with the `output` keyword and run `terraform refresh` for it to
become available. If you are using interpolation, please verify
the interpolated value is not empty. You can use the
`terraform console` command to assist.
Finished converging <default-local> (0m5.67s).
-----> Kitchen is finished. (0m8.12s)
-----> Starting Kitchen (v1.23.2)
$$$$$$ Running command `terraform version`
Terraform v0.11.7
+ provider.google (unversioned)
+ provider.local v1.1.0
+ provider.null v1.0.0
Your version of Terraform is out of date! The latest version
is 0.11.8. You can update by downloading from www.terraform.io/downloads.html
$$$$$$ Terraform v0.11.7 is supported
-----> Setting up <default-local>...
Finished setting up <default-local> (0m0.00s).
-----> Verifying <default-local>...
Detected alternative framework tests for `inspec`
Loaded tests from {:path=>"<MODULE_PATH>.test.integration.tmp.test.integration.default.inspec"}
Profile: tests from {:path=>"<MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/test/integration/default/inspec"} (tests from {:path=>"<MODULE_PATH>.test.integration.tmp.test.integration.default.inspec"})
Version: (not specified)
Target: local://
Command: `gcloud --project="${PROJECT_ID}" beta datastore indexes list --filter="properties[0].name=done" --format=json --quiet | jq -jce ".[0].kind"`
✔ exit_status should eq 0
✔ stdout should eq "Task"
Command: `gcloud --project="${PROJECT_ID}" beta datastore indexes list --filter="properties[0].name=done" --format=json --quiet | jq -jce ".[0].properties"`
✔ exit_status should eq 0
✔ stdout should eq "[{\"direction\":\"ASCENDING\",\"name\":\"done\"},{\"direction\":\"DESCENDING\",\"name\":\"priority\"}]"
Command: `gcloud --project="${PROJECT_ID}" beta datastore indexes list --filter="properties[0].name=collaborators" --format=json --quiet | jq -jce ".[0].kind"`
✔ exit_status should eq 0
✔ stdout should eq "Task"
Command: `gcloud --project="${PROJECT_ID}" beta datastore indexes list --filter="properties[0].name=collaborators" --format=json --quiet | jq -jce ".[0].properties"`
✔ exit_status should eq 0
✔ stdout should eq "[{\"direction\":\"ASCENDING\",\"name\":\"collaborators\"},{\"direction\":\"DESCENDING\",\"name\":\"created\"}]"
Test Summary: 8 successful, 0 failures, 0 skipped
Finished verifying <default-local> (0m4.94s).
-----> Kitchen is finished. (0m7.11s)
-----> Starting Kitchen (v1.23.2)
$$$$$$ Running command `terraform version`
Terraform v0.11.7
+ provider.google (unversioned)
+ provider.local v1.1.0
+ provider.null v1.0.0
Your version of Terraform is out of date! The latest version
is 0.11.8. You can update by downloading from www.terraform.io/downloads.html
$$$$$$ Terraform v0.11.7 is supported
-----> Destroying <default-local>...
$$$$$$ Running command `terraform init -input=false -lock=true -lock-timeout=0s -force-copy -backend=true -get=true -get-plugins=true -verify-plugins=true <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp`
Initializing modules...
- module.datastore
Initializing provider plugins...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.local: version = "~> 1.1"
* provider.null: version = "~> 1.0"
Terraform has been successfully initialized!
$$$$$$ Running command `terraform workspace select kitchen-terraform-default-local`
$$$$$$ Running command `terraform destroy -force -lock=true -lock-timeout=0s -input=false -parallelism=10 -refresh=true <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp`
local_file.cloud-datastore-index-file: Refreshing state... (ID: 087712ad531b642a3f898a9e704113d8ea8d9e0b)
null_resource.cloud-datastore-indices: Refreshing state... (ID: 354355332349398393)
null_resource.gcloud-activate-service-account: Refreshing state... (ID: 2135147794730009794)
module.datastore.null_resource.gcloud-activate-service-account: Destroying... (ID: 2135147794730009794)
module.datastore.null_resource.cloud-datastore-indices: Destroying... (ID: 354355332349398393)
module.datastore.null_resource.cloud-datastore-indices: Provisioning with 'local-exec'...
module.datastore.null_resource.gcloud-activate-service-account: Destruction complete after 0s
module.datastore.null_resource.cloud-datastore-indices (local-exec): Executing: ["/bin/sh" "-c" "gcloud datastore cleanup-indexes <MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/.terraform/modules/f44810a4a4f427d848d1bf00b11690e7/null_index/index.yaml --project=<PROJECT_ID>"]
module.datastore.null_resource.cloud-datastore-indices (local-exec): WARNING: `cleanup-indexes` is deprecated. Please use `gcloud datastore indexes cleanup` instead.
module.datastore.null_resource.cloud-datastore-indices (local-exec): Configurations to update:
module.datastore.null_resource.cloud-datastore-indices (local-exec): descriptor: [<MODULE_PATH>/terraform-google-cloud-datastore/test/integration/tmp/.terraform/modules/f44810a4a4f427d848d1bf00b11690e7/null_index/index.yaml]
module.datastore.null_resource.cloud-datastore-indices (local-exec): type: [datastore indexes]
module.datastore.null_resource.cloud-datastore-indices (local-exec): target project: [<PROJECT_ID>]
module.datastore.null_resource.cloud-datastore-indices (local-exec): Do you want to continue (Y/n)?
module.datastore.null_resource.cloud-datastore-indices (local-exec): This index is no longer defined in your index.yaml file.
module.datastore.null_resource.cloud-datastore-indices (local-exec): kind: Task
module.datastore.null_resource.cloud-datastore-indices (local-exec): properties:
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: asc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: done
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: desc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: priority
module.datastore.null_resource.cloud-datastore-indices (local-exec): Do you want to delete this index (Y/n)?
module.datastore.null_resource.cloud-datastore-indices (local-exec): This index is no longer defined in your index.yaml file.
module.datastore.null_resource.cloud-datastore-indices (local-exec): kind: Task
module.datastore.null_resource.cloud-datastore-indices (local-exec): properties:
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: asc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: collaborators
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: desc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: created
module.datastore.null_resource.cloud-datastore-indices (local-exec): Do you want to delete this index (Y/n)?
module.datastore.null_resource.cloud-datastore-indices (local-exec): WARNING: 2 indexes were not deleted. Most likely this is because they no longer exist.
module.datastore.null_resource.cloud-datastore-indices (local-exec): kind: Task
module.datastore.null_resource.cloud-datastore-indices (local-exec): properties:
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: asc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: done
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: desc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: priority
module.datastore.null_resource.cloud-datastore-indices (local-exec): kind: Task
module.datastore.null_resource.cloud-datastore-indices (local-exec): properties:
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: asc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: collaborators
module.datastore.null_resource.cloud-datastore-indices (local-exec): - direction: desc
module.datastore.null_resource.cloud-datastore-indices (local-exec): name: created
module.datastore.null_resource.cloud-datastore-indices: Destruction complete after 2s
module.datastore.local_file.cloud-datastore-index-file: Destroying... (ID: 087712ad531b642a3f898a9e704113d8ea8d9e0b)
module.datastore.local_file.cloud-datastore-index-file: Destruction complete after 0s
Destroy complete! Resources: 3 destroyed.
$$$$$$ Running command `terraform workspace select default`
Switched to workspace "default".
$$$$$$ Running command `terraform workspace delete kitchen-terraform-default-local`
Deleted workspace "kitchen-terraform-default-local"!
Finished destroying <default-local> (0m2.92s).
-----> Kitchen is finished. (0m5.11s)
<MODULE_PATH>/terraform-google-cloud-datastore
Integration test finished
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment