Skip to content

Commit 28f1301

Browse files
authored
pin provider. add tests (#60)
* pin provider. add tests * more tests * Move alpine dependencies
1 parent af23cdf commit 28f1301

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

provider.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
provider "null_resource" {
2+
version = "~> 2.1"
3+
}

test/Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,32 @@ endef
1212

1313
default: all
1414

15+
-include Makefile.*
16+
1517
## Provision the test-harnesss
1618
.test-harness:
1719
[ -d $@ ] || git clone --depth=1 -b $(TEST_HARNESS_BRANCH) $(TEST_HARNESS) $@
1820

1921
## Initialize the tests
2022
init: .test-harness
2123

24+
## Install all dependencies (OS specific)
25+
deps::
26+
@exit 0
27+
2228
## Clean up the test harness
2329
clean:
2430
[ "$(TEST_HARNESS_PATH)" == "/" ] || rm -rf $(TEST_HARNESS_PATH)
2531

2632
## Run all tests
2733
all: module examples/complete
2834

29-
## Install all dependencies (OS specific)
30-
deps: init
31-
@[ ! -x /sbin/apk ] || apk add --update terraform-docs@cloudposse
32-
3335
## Run basic sanity checks against the module itself
34-
module: export TESTS ?= installed lint get-modules validate terraform-docs input-descriptions output-descriptions
36+
module: export TESTS ?= installed lint get-modules module-pinning get-plugins provider-pinning validate terraform-docs input-descriptions output-descriptions
3537
module: deps
3638
$(call RUN_TESTS, ../)
3739

3840
## Run tests against example
39-
examples/complete: export TESTS ?= init plan apply
41+
examples/complete: export TESTS ?= installed lint get-modules get-plugins validate init plan apply
4042
examples/complete: deps
4143
$(call RUN_TESTS, ../$@)

test/Makefile.alpine

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ifneq (,$(wildcard /sbin/apk))
2+
## Install all dependencies for alpine
3+
deps:: init
4+
@apk add --update terraform-docs@cloudposse json2hcl@cloudposse
5+
endif

test/src/Makefile.alpine

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ifneq (,$(wildcard /sbin/apk))
22
.PHONY : deps
3+
## Install all dependencies for alpine
34
deps::
45
mkdir -p $(GOBIN)
56
apk add --update go

0 commit comments

Comments
 (0)