-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
push_rules_test.go
28 lines (24 loc) · 1.48 KB
/
push_rules_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package config
import (
_ "embed"
"testing"
"github.com/stretchr/testify/assert"
)
func TestParsePushRulesDocumentation(t *testing.T) {
t.Parallel()
data, errE := parsePushRulesDocumentation(testProjects)
assert.NoError(t, errE, "% -+#.1v", errE)
assert.Equal(t, map[string]string{
"author_email_regex": "All commit author emails must match this, for example @my-company.com$. Type: string",
"branch_name_regex": "All branch names must match this, for example `(feature. Type: string",
"commit_committer_check": "Users can only push commits to this repository if the committer email is one of their own verified emails. Type: boolean",
"commit_message_negative_regex": "No commit message is allowed to match this, for example ssh\\:\\/\\/. Type: string",
"commit_message_regex": "All commit messages must match this, for example Fixed \\d+\\..*. Type: string",
"deny_delete_tag": "Deny deleting a tag. Type: boolean",
"file_name_regex": "All committed filenames must not match this, for example `(jar. Type: string",
"max_file_size": "Maximum file size (MB). Type: integer",
"member_check": "Restrict commits by author (email) to existing GitLab users. Type: boolean",
"prevent_secrets": "GitLab rejects any files that are likely to contain secrets. Type: boolean",
"reject_unsigned_commits": "Reject commits when they are not GPG signed. Type: boolean",
}, data)
}