We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21b7212 commit c940233Copy full SHA for c940233
generator_test.go
@@ -1 +1,27 @@
1
package main
2
+
3
+import (
4
+ "os"
5
+ "testing"
6
+)
7
8
+var mockFile = "mock.tf"
9
10
+func TestContainsElement(t *testing.T) {
11
+ testSlice := []string{"Terraform", "Puppet", "Ansible"}
12
+ if containsElement(testSlice, "Chef") {
13
+ t.Error("Should return false, but return true")
14
+ }
15
+}
16
17
+func TestGetAllFiles(t *testing.T) {
18
+ var file, err = os.Create(mockFile)
19
+ checkError(err)
20
+ defer file.Close()
21
+ files, err := getAllFiles(tfFileExt)
22
23
+ if len(files) == 0 {
24
+ t.Error("Should found at least one file")
25
26
+ defer os.Remove(mockFile)
27
0 commit comments