From 1f2b885740442ed3646006633c25dd40f0d6a45e Mon Sep 17 00:00:00 2001 From: Ross Golder Date: Thu, 23 Oct 2025 22:10:07 +0700 Subject: [PATCH] Revert fixture and test changes from merges - not part of the Actions API feature --- models/fixtures/collaboration.yml | 12 ------------ models/fixtures/repo_unit.yml | 14 -------------- models/repo/collaboration_test.go | 2 +- modules/git/notes_test.go | 2 +- modules/setting/indexer_test.go | 2 +- 5 files changed, 3 insertions(+), 29 deletions(-) diff --git a/models/fixtures/collaboration.yml b/models/fixtures/collaboration.yml index 74f6f24c86..4c3ac367f6 100644 --- a/models/fixtures/collaboration.yml +++ b/models/fixtures/collaboration.yml @@ -4,18 +4,6 @@ user_id: 2 mode: 2 # write -- - id: 12 - repo_id: 2 - user_id: 4 - mode: 1 # read - -- - id: 13 - repo_id: 4 - user_id: 2 - mode: 1 # read - - id: 2 repo_id: 4 diff --git a/models/fixtures/repo_unit.yml b/models/fixtures/repo_unit.yml index d53a7c9edd..f6b6252da1 100644 --- a/models/fixtures/repo_unit.yml +++ b/models/fixtures/repo_unit.yml @@ -733,17 +733,3 @@ type: 3 config: "{\"IgnoreWhitespaceConflicts\":false,\"AllowMerge\":true,\"AllowRebase\":true,\"AllowRebaseMerge\":true,\"AllowSquash\":true}" created_unix: 946684810 - -- - id: 111 - repo_id: 2 - type: 10 - config: "{}" - created_unix: 946684810 - -- - id: 112 - repo_id: 4 - type: 10 - config: "{}" - created_unix: 946684810 diff --git a/models/repo/collaboration_test.go b/models/repo/collaboration_test.go index 7b346b3ed6..7e06bffb72 100644 --- a/models/repo/collaboration_test.go +++ b/models/repo/collaboration_test.go @@ -65,7 +65,7 @@ func TestRepository_IsCollaborator(t *testing.T) { } test(3, 2, true) test(3, unittest.NonexistentID, false) - test(4, 2, true) + test(4, 2, false) test(4, 4, true) } diff --git a/modules/git/notes_test.go b/modules/git/notes_test.go index 5abb68b102..7db2dbc0b9 100644 --- a/modules/git/notes_test.go +++ b/modules/git/notes_test.go @@ -47,5 +47,5 @@ func TestGetNonExistentNotes(t *testing.T) { note := Note{} err = GetNote(t.Context(), bareRepo1, "non_existent_sha", ¬e) assert.Error(t, err) - assert.ErrorAs(t, err, &ErrNotExist{}) + assert.IsType(t, ErrNotExist{}, err) } diff --git a/modules/setting/indexer_test.go b/modules/setting/indexer_test.go index 498f8752a2..8f0437be8a 100644 --- a/modules/setting/indexer_test.go +++ b/modules/setting/indexer_test.go @@ -65,7 +65,7 @@ func checkGlobMatch(t *testing.T, globstr string, list []indexerMatchList) { } } if !found { - assert.Equal(t, -1, m.position, "Test string `%s` doesn't match `%s` anywhere; expected @%d", m.value, globstr, m.position) + assert.Equal(t, m.position, -1, "Test string `%s` doesn't match `%s` anywhere; expected @%d", m.value, globstr, m.position) } } }