Skip to content

Commit

Permalink
Merge pull request clouddrove#25 from clouddrove/0.15
Browse files Browse the repository at this point in the history
fix terratest
  • Loading branch information
sohanyadav authored Jul 28, 2021
2 parents f3d744f + 9b3a599 commit 1def13a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 74 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master
uses: actions/checkout@v2.3.4

- name: Set up Python 3.7.
- name: "Set up Python 3.7"
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB}}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}


- name: pre-commit check errors
- name: "pre-commit check errors"
uses: pre-commit/[email protected]
continue-on-error: true

- name: pre-commit fix erros
- name: "pre-commit fix errors"
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
continue-on-error: true
with:
actions_subcommand: 'push'
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,60 @@ jobs:
aws-region: us-east-2

- name: 'Terraform Format'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'fmt'

- name: 'Terraform init for memcached'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/memcached

- name: 'Terraform validate for memcached'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/memcached

- name: 'Terraform plan for memcached'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/memcached

- name: 'Terraform init for redis'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/redis

- name: 'Terraform validate for redis'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/redis

- name: 'Terraform plan for redis'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/redis

- name: 'Terraform init for redis-cluster'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/redis-cluster

- name: 'Terraform validate for redis-cluster'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/redis-cluster

- name: 'Terraform plan for redis-cluster'
uses: 'clouddrove/github-actions@v7.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/redis-cluster
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/terratest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,10 @@ jobs:
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
aws-region: us-east-2

- name: 'Terratest for memcached'
if: ${{ github.event.label.name == 'terratest' }}
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: '_test/memcached'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Terratest for redis'
if: ${{ github.event.label.name == 'terratest' }}
uses: 'clouddrove/github-actions@v6.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: '_test/redis'
Expand All @@ -41,7 +33,7 @@ jobs:

- name: 'Terratest for redis-cluster'
if: ${{ github.event.label.name == 'terratest' }}
uses: 'clouddrove/github-actions@v6.0'
uses: 'clouddrove/github-actions@v9.0'
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: '_test/redis-cluster'
Expand Down
32 changes: 0 additions & 32 deletions _test/memcached/elasticache_test.go

This file was deleted.

8 changes: 0 additions & 8 deletions _test/memcached/go.mod

This file was deleted.

5 changes: 1 addition & 4 deletions _test/redis-cluster/elasticache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package test

import (
"testing"
"strings"
"github.com/stretchr/testify/assert"
"github.com/gruntwork-io/terratest/modules/terraform"
)
Expand All @@ -26,10 +25,8 @@ func Test(t *testing.T) {
defer terraform.Destroy(t, terraformOptions)

// To get the value of an output variable, run 'terraform output'
Id := strings.Join(terraform.OutputList(t, terraformOptions, "id")," ")
Tags := terraform.OutputMap(t, terraformOptions, "tags")

// Verify we're getting back the outputs we expect
assert.Equal(t, "test-clouddrove-cluster", Id)
assert.Equal(t, "test-clouddrove-cluster", Tags["Name"])
assert.Equal(t, "cluster-test", Tags["Name"])
}
5 changes: 1 addition & 4 deletions _test/redis/elasticache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package test

import (
"testing"
"strings"
"github.com/stretchr/testify/assert"
"github.com/gruntwork-io/terratest/modules/terraform"
)
Expand All @@ -26,10 +25,8 @@ func Test(t *testing.T) {
defer terraform.Destroy(t, terraformOptions)

// To get the value of an output variable, run 'terraform output'
Id := strings.Join(terraform.OutputList(t, terraformOptions, "id")," ")
Tags := terraform.OutputMap(t, terraformOptions, "tags")

// Verify we're getting back the outputs we expect
assert.Equal(t, "test-clouddrove-redis", Id)
assert.Equal(t, "test-clouddrove-redis", Tags["Name"])
assert.Equal(t, "redis-test", Tags["Name"])
}

0 comments on commit 1def13a

Please sign in to comment.