mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-13 22:05:20 +01:00
test: remove unused kitchen test related stuff (#787)
Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,8 +3,6 @@
|
||||
.terraform/
|
||||
**/inspec.lock
|
||||
*.gem
|
||||
.kitchen/
|
||||
.kitchen.local.yml
|
||||
Gemfile.lock
|
||||
terraform.tfstate.d/
|
||||
eks-admin-cluster-role-binding.yaml
|
||||
|
||||
20
.kitchen.yml
20
.kitchen.yml
@@ -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"
|
||||
@@ -1 +0,0 @@
|
||||
2.4.6
|
||||
9
Gemfile
9
Gemfile
@@ -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
|
||||
22
README.md
22
README.md
@@ -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).
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user