Kaynağa Gözat

doc: Allow "test" for unittests, integration tests, etc

jamesread 3 yıl önce
ebeveyn
işleme
fadc616a67
2 değiştirilmiş dosya ile 14 ekleme ve 0 silme
  1. 1 0
      .githooks/commit-msg
  2. 13 0
      internal/config/config_helpers_test.go

+ 1 - 0
.githooks/commit-msg

@@ -11,6 +11,7 @@ print("Commit message is: " + commitmsg)
 
 ALLOWED_COMMIT_TYPES = [
     "cicd",
+    "test",
     "refactor",
     "depbump",
     "typo",

+ 13 - 0
internal/config/config_helpers_test.go

@@ -31,3 +31,16 @@ func TestFindAction(t *testing.T) {
 
 	assert.Nil(t, c.FindAction("waffles"), "Find non-existent action")
 }
+
+func TestFindAcl(t *testing.T) {
+	c := DefaultConfig()
+
+	acl1 := AccessControlList{
+		Name: "Testing ACL",
+	}
+
+	c.AccessControlLists = append(c.AccessControlLists, acl1)
+
+	assert.NotNil(t, c.FindAcl("Testing ACL"), "Find a ACL that should exist")
+	assert.Nil(t, c.FindAcl("Chocolate Cake"), "Find a ACL that does not exist")
+}