Skip to content

Commit 1def13a

Browse files
authored
Merge pull request clouddrove#25 from clouddrove/0.15
fix terratest
2 parents f3d744f + 9b3a599 commit 1def13a

File tree

7 files changed

+20
-74
lines changed

7 files changed

+20
-74
lines changed

.github/workflows/readme.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: 'Checkout'
13-
uses: actions/checkout@master
13+
uses: actions/checkout@v2.3.4
1414

15-
- name: Set up Python 3.7.
15+
- name: "Set up Python 3.7"
1616
uses: actions/setup-python@v2
1717
with:
1818
python-version: '3.x'
1919

2020
- name: 'create readme'
21-
uses: 'clouddrove/github-actions@v7.0'
21+
uses: 'clouddrove/github-actions@v9.0'
2222
with:
2323
actions_subcommand: 'readme'
2424
github_token: '${{ secrets.GITHUB}}'
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
2727

2828

29-
- name: pre-commit check errors
29+
- name: "pre-commit check errors"
3030
uses: pre-commit/[email protected]
3131
continue-on-error: true
3232

33-
- name: pre-commit fix erros
33+
- name: "pre-commit fix errors"
3434
uses: pre-commit/[email protected]
3535
continue-on-error: true
3636

3737
- name: 'push readme'
38-
uses: 'clouddrove/github-actions@v7.0'
38+
uses: 'clouddrove/github-actions@v9.0'
3939
continue-on-error: true
4040
with:
4141
actions_subcommand: 'push'

.github/workflows/terraform.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,60 +20,60 @@ jobs:
2020
aws-region: us-east-2
2121

2222
- name: 'Terraform Format'
23-
uses: 'clouddrove/github-actions@v7.0'
23+
uses: 'clouddrove/github-actions@v9.0'
2424
with:
2525
actions_subcommand: 'fmt'
2626

2727
- name: 'Terraform init for memcached'
28-
uses: 'clouddrove/github-actions@v7.0'
28+
uses: 'clouddrove/github-actions@v9.0'
2929
with:
3030
actions_subcommand: 'init'
3131
tf_actions_working_dir: ./_example/memcached
3232

3333
- name: 'Terraform validate for memcached'
34-
uses: 'clouddrove/github-actions@v7.0'
34+
uses: 'clouddrove/github-actions@v9.0'
3535
with:
3636
actions_subcommand: 'validate'
3737
tf_actions_working_dir: ./_example/memcached
3838

3939
- name: 'Terraform plan for memcached'
40-
uses: 'clouddrove/github-actions@v7.0'
40+
uses: 'clouddrove/github-actions@v9.0'
4141
with:
4242
actions_subcommand: 'plan'
4343
tf_actions_working_dir: ./_example/memcached
4444

4545
- name: 'Terraform init for redis'
46-
uses: 'clouddrove/github-actions@v7.0'
46+
uses: 'clouddrove/github-actions@v9.0'
4747
with:
4848
actions_subcommand: 'init'
4949
tf_actions_working_dir: ./_example/redis
5050

5151
- name: 'Terraform validate for redis'
52-
uses: 'clouddrove/github-actions@v7.0'
52+
uses: 'clouddrove/github-actions@v9.0'
5353
with:
5454
actions_subcommand: 'validate'
5555
tf_actions_working_dir: ./_example/redis
5656

5757
- name: 'Terraform plan for redis'
58-
uses: 'clouddrove/github-actions@v7.0'
58+
uses: 'clouddrove/github-actions@v9.0'
5959
with:
6060
actions_subcommand: 'plan'
6161
tf_actions_working_dir: ./_example/redis
6262

6363
- name: 'Terraform init for redis-cluster'
64-
uses: 'clouddrove/github-actions@v7.0'
64+
uses: 'clouddrove/github-actions@v9.0'
6565
with:
6666
actions_subcommand: 'init'
6767
tf_actions_working_dir: ./_example/redis-cluster
6868

6969
- name: 'Terraform validate for redis-cluster'
70-
uses: 'clouddrove/github-actions@v7.0'
70+
uses: 'clouddrove/github-actions@v9.0'
7171
with:
7272
actions_subcommand: 'validate'
7373
tf_actions_working_dir: ./_example/redis-cluster
7474

7575
- name: 'Terraform plan for redis-cluster'
76-
uses: 'clouddrove/github-actions@v7.0'
76+
uses: 'clouddrove/github-actions@v9.0'
7777
with:
7878
actions_subcommand: 'plan'
7979
tf_actions_working_dir: ./_example/redis-cluster

.github/workflows/terratest.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,10 @@ jobs:
2121
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
2222
aws-region: us-east-2
2323

24-
- name: 'Terratest for memcached'
25-
if: ${{ github.event.label.name == 'terratest' }}
26-
uses: 'clouddrove/[email protected]'
27-
with:
28-
actions_subcommand: 'terratest'
29-
tf_actions_working_dir: '_test/memcached'
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3224

3325
- name: 'Terratest for redis'
3426
if: ${{ github.event.label.name == 'terratest' }}
35-
uses: 'clouddrove/github-actions@v6.0'
27+
uses: 'clouddrove/github-actions@v9.0'
3628
with:
3729
actions_subcommand: 'terratest'
3830
tf_actions_working_dir: '_test/redis'
@@ -41,7 +33,7 @@ jobs:
4133

4234
- name: 'Terratest for redis-cluster'
4335
if: ${{ github.event.label.name == 'terratest' }}
44-
uses: 'clouddrove/github-actions@v6.0'
36+
uses: 'clouddrove/github-actions@v9.0'
4537
with:
4638
actions_subcommand: 'terratest'
4739
tf_actions_working_dir: '_test/redis-cluster'

_test/memcached/elasticache_test.go

Lines changed: 0 additions & 32 deletions
This file was deleted.

_test/memcached/go.mod

Lines changed: 0 additions & 8 deletions
This file was deleted.

_test/redis-cluster/elasticache_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package test
55

66
import (
77
"testing"
8-
"strings"
98
"github.com/stretchr/testify/assert"
109
"github.com/gruntwork-io/terratest/modules/terraform"
1110
)
@@ -26,10 +25,8 @@ func Test(t *testing.T) {
2625
defer terraform.Destroy(t, terraformOptions)
2726

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

3230
// Verify we're getting back the outputs we expect
33-
assert.Equal(t, "test-clouddrove-cluster", Id)
34-
assert.Equal(t, "test-clouddrove-cluster", Tags["Name"])
31+
assert.Equal(t, "cluster-test", Tags["Name"])
3532
}

_test/redis/elasticache_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package test
55

66
import (
77
"testing"
8-
"strings"
98
"github.com/stretchr/testify/assert"
109
"github.com/gruntwork-io/terratest/modules/terraform"
1110
)
@@ -26,10 +25,8 @@ func Test(t *testing.T) {
2625
defer terraform.Destroy(t, terraformOptions)
2726

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

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

0 commit comments

Comments
 (0)