diff options
| author | Alexander Kavon <me+git@alexkavon.com> | 2024-01-25 02:47:26 -0500 |
|---|---|---|
| committer | Alexander Kavon <me+git@alexkavon.com> | 2024-01-25 02:47:26 -0500 |
| commit | 60eb2e7fe5ed3627ad4bd40286df1741529da75b (patch) | |
| tree | f18d8bbbc3590183333778a4e96bebff187366b2 /src/models/boil_relationship_test.go | |
| parent | 60fd8a68ed87cd7352b490e88ceff3ec21855937 (diff) | |
update hooks to more identifiable names, update migrations to work with votes, use a common enum state typeHEADtrunk
Diffstat (limited to 'src/models/boil_relationship_test.go')
| -rw-r--r-- | src/models/boil_relationship_test.go | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/models/boil_relationship_test.go b/src/models/boil_relationship_test.go index 191d17c..dad70c3 100644 --- a/src/models/boil_relationship_test.go +++ b/src/models/boil_relationship_test.go @@ -8,8 +8,13 @@ import "testing" // TestToOne tests cannot be run in parallel // or deadlocks can occur. func TestToOne(t *testing.T) { + t.Run("CommentToPostUsingPost", testCommentToOnePostUsingPost) + t.Run("CommentToCommentUsingReply", testCommentToOneCommentUsingReply) + t.Run("CommentToUserUsingUser", testCommentToOneUserUsingUser) t.Run("PostToUserUsingUser", testPostToOneUserUsingUser) t.Run("TagToUserUsingUser", testTagToOneUserUsingUser) + t.Run("VoteToCommentUsingComment", testVoteToOneCommentUsingComment) + t.Run("VoteToPostUsingPost", testVoteToOnePostUsingPost) } // TestOneToOne tests cannot be run in parallel @@ -19,8 +24,13 @@ func TestOneToOne(t *testing.T) {} // TestToMany tests cannot be run in parallel // or deadlocks can occur. func TestToMany(t *testing.T) { + t.Run("CommentToReplyComments", testCommentToManyReplyComments) + t.Run("CommentToVotes", testCommentToManyVotes) + t.Run("PostToComments", testPostToManyComments) t.Run("PostToTags", testPostToManyTags) + t.Run("PostToVotes", testPostToManyVotes) t.Run("TagToPosts", testTagToManyPosts) + t.Run("UserToComments", testUserToManyComments) t.Run("UserToPosts", testUserToManyPosts) t.Run("UserToTags", testUserToManyTags) } @@ -28,13 +38,22 @@ func TestToMany(t *testing.T) { // TestToOneSet tests cannot be run in parallel // or deadlocks can occur. func TestToOneSet(t *testing.T) { + t.Run("CommentToPostUsingComments", testCommentToOneSetOpPostUsingPost) + t.Run("CommentToCommentUsingReplyComments", testCommentToOneSetOpCommentUsingReply) + t.Run("CommentToUserUsingComments", testCommentToOneSetOpUserUsingUser) t.Run("PostToUserUsingPosts", testPostToOneSetOpUserUsingUser) t.Run("TagToUserUsingTags", testTagToOneSetOpUserUsingUser) + t.Run("VoteToCommentUsingVotes", testVoteToOneSetOpCommentUsingComment) + t.Run("VoteToPostUsingVotes", testVoteToOneSetOpPostUsingPost) } // TestToOneRemove tests cannot be run in parallel // or deadlocks can occur. -func TestToOneRemove(t *testing.T) {} +func TestToOneRemove(t *testing.T) { + t.Run("CommentToCommentUsingReplyComments", testCommentToOneRemoveOpCommentUsingReply) + t.Run("VoteToCommentUsingVotes", testVoteToOneRemoveOpCommentUsingComment) + t.Run("VoteToPostUsingVotes", testVoteToOneRemoveOpPostUsingPost) +} // TestOneToOneSet tests cannot be run in parallel // or deadlocks can occur. @@ -47,8 +66,13 @@ func TestOneToOneRemove(t *testing.T) {} // TestToManyAdd tests cannot be run in parallel // or deadlocks can occur. func TestToManyAdd(t *testing.T) { + t.Run("CommentToReplyComments", testCommentToManyAddOpReplyComments) + t.Run("CommentToVotes", testCommentToManyAddOpVotes) + t.Run("PostToComments", testPostToManyAddOpComments) t.Run("PostToTags", testPostToManyAddOpTags) + t.Run("PostToVotes", testPostToManyAddOpVotes) t.Run("TagToPosts", testTagToManyAddOpPosts) + t.Run("UserToComments", testUserToManyAddOpComments) t.Run("UserToPosts", testUserToManyAddOpPosts) t.Run("UserToTags", testUserToManyAddOpTags) } @@ -56,13 +80,19 @@ func TestToManyAdd(t *testing.T) { // TestToManySet tests cannot be run in parallel // or deadlocks can occur. func TestToManySet(t *testing.T) { + t.Run("CommentToReplyComments", testCommentToManySetOpReplyComments) + t.Run("CommentToVotes", testCommentToManySetOpVotes) t.Run("PostToTags", testPostToManySetOpTags) + t.Run("PostToVotes", testPostToManySetOpVotes) t.Run("TagToPosts", testTagToManySetOpPosts) } // TestToManyRemove tests cannot be run in parallel // or deadlocks can occur. func TestToManyRemove(t *testing.T) { + t.Run("CommentToReplyComments", testCommentToManyRemoveOpReplyComments) + t.Run("CommentToVotes", testCommentToManyRemoveOpVotes) t.Run("PostToTags", testPostToManyRemoveOpTags) + t.Run("PostToVotes", testPostToManyRemoveOpVotes) t.Run("TagToPosts", testTagToManyRemoveOpPosts) } |
