test: remove unused kitchen test related stuff (#787)

Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
This commit is contained in:
Max Williams
2020-03-17 16:36:34 +01:00
committed by GitHub
parent a6583a3371
commit cd8a825a5a
6 changed files with 0 additions and 63 deletions

2
.gitignore vendored
View File

@@ -3,8 +3,6 @@
.terraform/
**/inspec.lock
*.gem
.kitchen/
.kitchen.local.yml
Gemfile.lock
terraform.tfstate.d/
eks-admin-cluster-role-binding.yaml

View File

@@ -1,20 +0,0 @@
---
driver:
name: "terraform"
root_module_directory: "examples/basic"
provisioner:
name: "terraform"
platforms:
- name: "aws"
verifier:
name: "awspec"
suites:
- name: "default"
verifier:
name: "awspec"
patterns:
- "test/integration/default/test_eks.rb"

View File

@@ -1 +0,0 @@
2.4.6

View File

@@ -1,9 +0,0 @@
# frozen_string_literal: true
ruby '2.4.6'
source 'https://rubygems.org/' do
gem 'awspec', '~> 1.4.2'
gem 'kitchen-terraform', '~> 3.2'
gem 'kitchen-verifier-awspec', '~> 0.1.1'
end

View File

@@ -94,28 +94,6 @@ module "eks" {
* [IAM Permissions](https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/iam-permissions.md): Minimum IAM permissions needed to setup EKS Cluster.
* [FAQ](https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md): Frequently Asked Questions
## Testing
This module has been packaged with [awspec](https://github.com/k1LoW/awspec) tests through [kitchen](https://kitchen.ci/) and [kitchen-terraform](https://newcontext-oss.github.io/kitchen-terraform/). To run them:
1. Install [rvm](https://rvm.io/rvm/install) and the ruby version specified in the [Gemfile](https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/Gemfile).
2. Install bundler and the gems from our Gemfile:
```bash
gem install bundler && bundle install
```
3. Ensure your AWS environment is configured (i.e. credentials and region) for test.
4. Test using `bundle exec kitchen test` from the root of the repo.
For now, connectivity to the kubernetes cluster is not tested but will be in the
future. Once the test fixture has converged, you can query the test cluster from
that terminal session with
```bash
kubectl get nodes --watch --kubeconfig kubeconfig
```
(using default settings `config_output_path = "./"` & `write_kubeconfig = true`)
## Doc generation
Code formatting and documentation for variables and outputs is generated using [pre-commit-terraform hooks](https://github.com/antonbabenko/pre-commit-terraform) which uses [terraform-docs](https://github.com/segmentio/terraform-docs).

View File

@@ -1,9 +0,0 @@
# frozen_string_literal: true
require 'awspec'
# rubocop:disable LineLength
state_file = 'terraform.tfstate.d/kitchen-terraform-default-aws/terraform.tfstate'
tf_state = JSON.parse(File.open(state_file).read)
region = tf_state['modules'][0]['outputs']['region']['value']
ENV['AWS_REGION'] = region