Skip to content

Commit 968b1af

Browse files
committed
Remove tests
These tests check validation that was handover to the Terraform built-in validation
1 parent 1b97fb4 commit 968b1af

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

github/util_ruleset_validation_test.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -165,37 +165,6 @@ func Test_validateConditionsFieldForBranchAndTagTargets(t *testing.T) {
165165
expectError: true,
166166
errorMsg: "ref_name must be set for branch target",
167167
},
168-
{
169-
name: "invalid branch target without repository_name or repository_id",
170-
target: github.RulesetTargetBranch,
171-
conditions: map[string]any{
172-
"ref_name": []any{map[string]any{"include": []any{"~DEFAULT_BRANCH"}, "exclude": []any{}}},
173-
},
174-
expectError: true,
175-
errorMsg: "either repository_name or repository_id must be set for branch target",
176-
},
177-
{
178-
name: "invalid tag target with nil repository_name and repository_id",
179-
target: github.RulesetTargetTag,
180-
conditions: map[string]any{
181-
"ref_name": []any{map[string]any{"include": []any{"v*"}, "exclude": []any{}}},
182-
"repository_name": nil,
183-
"repository_id": nil,
184-
},
185-
expectError: true,
186-
errorMsg: "either repository_name or repository_id must be set for tag target",
187-
},
188-
{
189-
name: "invalid branch target with empty repository_name and repository_id slices",
190-
target: github.RulesetTargetBranch,
191-
conditions: map[string]any{
192-
"ref_name": []any{map[string]any{"include": []any{"~DEFAULT_BRANCH"}, "exclude": []any{}}},
193-
"repository_name": []any{},
194-
"repository_id": []any{},
195-
},
196-
expectError: true,
197-
errorMsg: "either repository_name or repository_id must be set for branch target",
198-
},
199168
}
200169

201170
for _, tt := range tests {

0 commit comments

Comments
 (0)