diff options
author | Giteabot <teabot@gitea.io> | 2023-10-09 11:56:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-09 11:56:02 +0800 |
commit | fb5ae2ab94948eea39b39597eb7a3bcb9f4307e1 (patch) | |
tree | 017bed2f007d5d0f38084d8c478dec5e2e627dca /tests | |
parent | 8419897fbac7e87a1866e111222a076848cf582f (diff) | |
download | gitea-fb5ae2ab94948eea39b39597eb7a3bcb9f4307e1.tar.gz gitea-fb5ae2ab94948eea39b39597eb7a3bcb9f4307e1.zip |
Restore warning commit status (#27504) (#27529)
Backport #27504 by @silverwind
Partial revert of https://github.com/go-gitea/gitea/pull/25839. This
commit status is used by a number of external integrations, so I think
we should not remove it (See
https://github.com/go-gitea/gitea/pull/25839#issuecomment-1729002077).
This is a rare case where an existing migration needed to be alterted to
avoid data loss.
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/pull_status_test.go | 2 | ||||
-rw-r--r-- | tests/integration/repo_commits_test.go | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/integration/pull_status_test.go b/tests/integration/pull_status_test.go index 7c1f8c701e..01cb40d2cf 100644 --- a/tests/integration/pull_status_test.go +++ b/tests/integration/pull_status_test.go @@ -53,6 +53,7 @@ func TestPullCreate_CommitStatus(t *testing.T) { api.CommitStatusError, api.CommitStatusFailure, api.CommitStatusSuccess, + api.CommitStatusWarning, } statesIcons := map[api.CommitStatusState]string{ @@ -60,6 +61,7 @@ func TestPullCreate_CommitStatus(t *testing.T) { api.CommitStatusSuccess: "octicon-check", api.CommitStatusError: "gitea-exclamation", api.CommitStatusFailure: "octicon-x", + api.CommitStatusWarning: "gitea-exclamation", } testCtx := NewAPITestContext(t, "user1", "repo1", auth_model.AccessTokenScopeWriteRepository) diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index 789b5f7cc3..bb65d9e04a 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -125,6 +125,10 @@ func TestRepoCommitsWithStatusFailure(t *testing.T) { doTestRepoCommitWithStatus(t, "failure", "octicon-x", "red") } +func TestRepoCommitsWithStatusWarning(t *testing.T) { + doTestRepoCommitWithStatus(t, "warning", "gitea-exclamation", "yellow") +} + func TestRepoCommitsStatusParallel(t *testing.T) { defer tests.PrepareTestEnv(t)() |