Skip to content

Commit

Permalink
Add comment to gitea test file
Browse files Browse the repository at this point in the history
  • Loading branch information
savitaashture committed Jun 23, 2023
1 parent d5dd075 commit 0e4cddb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/gitea_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ func TestGiteaACLOrgAllowed(t *testing.T) {
tgitea.WaitForStatus(t, topts, topts.TargetRefName)
}

func TestGiteaACLOrgSkipped(t *testing.T) {
// TestGiteaACLOrgPendingApproval tests when non authorized user sends a PR the status of CI shows as pending.
func TestGiteaACLOrgPendingApproval(t *testing.T) {
topts := &tgitea.TestOpts{
TargetEvent: options.PullRequestEvent,
YAMLFiles: map[string]string{
Expand All @@ -265,6 +266,7 @@ func TestGiteaACLOrgSkipped(t *testing.T) {
assert.NilError(t, err)

topts.PullRequest = tgitea.CreateForkPullRequest(t, topts, secondcnx, "", "echo Hello from user "+topts.TargetRefName)
// status of CI is pending because PR sent by non authorized user
topts.CheckForStatus = "pending"
tgitea.WaitForStatus(t, topts, topts.PullRequest.Head.Sha)
topts.Regexp = regexp.MustCompile(`.*is skipping this commit.*`)
Expand Down

0 comments on commit 0e4cddb

Please sign in to comment.