Skip to content

Commit

Permalink
Merge pull request #7 from clouddrove/0.15
Browse files Browse the repository at this point in the history
fix terratest
  • Loading branch information
Sohan Yadav committed Jul 14, 2021
2 parents dd414b6 + 2edd405 commit 65fb327
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 1,669 deletions.
22 changes: 15 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.45.0

- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.12 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
hooks:
- id: terraform_fmt
- id: terraform-fmt
- id: shellcheck
- id: tflint

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1 # Use the ref you want to point at
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: check-added-large-files
- id: trailing-whitespace
- id: check-added-large-files
8 changes: 0 additions & 8 deletions _test/anomaly_example/go.mod

This file was deleted.

542 changes: 0 additions & 542 deletions _test/anomaly_example/go.sum

This file was deleted.

6 changes: 2 additions & 4 deletions _test/anomaly_example/watch_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Managed By : CloudDrove
// Description : This Terratest is used to test the Terraform VPC module.
// Description : This Terratest is used to test the Terraform cloudwatch-alarm module.
// Copyright @ CloudDrove. All Right Reserved.
package test

Expand All @@ -24,10 +24,8 @@ func TestCloudWatch(t *testing.T) {
defer terraform.Destroy(t, terraformOptions)

// To get the value of an output variable, run 'terraform output'
Arn := terraform.Output(t, terraformOptions, "arn")
Tags := terraform.OutputMap(t, terraformOptions, "tags")

// Check that we get back the outputs that we expect
assert.Equal(t, "test-alarm-clouddrove", Tags["Name"])
assert.Contains(t, Arn, "arn:aws:cloudwatch")
assert.Equal(t, "alarm-test", Tags["Name"])
}
8 changes: 0 additions & 8 deletions _test/basic_example/go.mod

This file was deleted.

542 changes: 0 additions & 542 deletions _test/basic_example/go.sum

This file was deleted.

6 changes: 2 additions & 4 deletions _test/basic_example/watch_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Managed By : CloudDrove
// Description : This Terratest is used to test the Terraform VPC module.
// Description : This Terratest is used to test the Terraform cloudwatch-alarm module.
// Copyright @ CloudDrove. All Right Reserved.
package test

Expand All @@ -24,10 +24,8 @@ func TestCloudWatch(t *testing.T) {
defer terraform.Destroy(t, terraformOptions)

// To get the value of an output variable, run 'terraform output'
Arn := terraform.Output(t, terraformOptions, "arn")
Tags := terraform.OutputMap(t, terraformOptions, "tags")

// Check that we get back the outputs that we expect
assert.Equal(t, "test-alarm-clouddrove", Tags["Name"])
assert.Contains(t, Arn, "arn:aws:cloudwatch")
assert.Equal(t, "alarm-test", Tags["Name"])
}
8 changes: 0 additions & 8 deletions _test/expression_example/go.mod

This file was deleted.

542 changes: 0 additions & 542 deletions _test/expression_example/go.sum

This file was deleted.

6 changes: 2 additions & 4 deletions _test/expression_example/watch_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Managed By : CloudDrove
// Description : This Terratest is used to test the Terraform VPC module.
// Description : This Terratest is used to test the Terraform cloudwatch-alarm module.
// Copyright @ CloudDrove. All Right Reserved.
package test

Expand All @@ -24,10 +24,8 @@ func TestCloudWatch(t *testing.T) {
defer terraform.Destroy(t, terraformOptions)

// To get the value of an output variable, run 'terraform output'
Arn := terraform.Output(t, terraformOptions, "arn")
Tags := terraform.OutputMap(t, terraformOptions, "tags")

// Check that we get back the outputs that we expect
assert.Equal(t, "test-alarm-clouddrove", Tags["Name"])
assert.Contains(t, Arn, "arn:aws:cloudwatch")
assert.Equal(t, "alarm-test", Tags["Name"])
}

0 comments on commit 65fb327

Please sign in to comment.