You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gallery_test.go
    path of file: ./repos/stash/internal/autotag
    
    the code of the file until where you have to start completion: package autotag

import (
	"context"
	"testing"

	"github.com/stashapp/stash/pkg/models"
	"github.com/stashapp/stash/pkg/models/mocks"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/mock"
)

const galleryExt = "zip"

var testCtx = context.Background()

// returns got == expected
// ignores expected.UpdatedAt, but ensures that got.UpdatedAt is set and not null
func galleryPartialsEqual(got, expected models.GalleryPartial) bool {
	// updated at should be set and not null
	if !got.UpdatedAt.Set || got.UpdatedAt.Null {
		return false
	}
	// else ignore
    
func TestGalleryPerformers(t *testing.T) {
	t.Parallel()

	const galleryID = 1
	const performerName = "performer name"
	const performerID = 2
	performer := models.Performer{
		ID:      performerID,
		Name:    performerName,
		Aliases: models.NewRelatedStrings([]string{}),
	}

	const reversedPerformerName = "name performer"
	const reversedPerformerID = 3
	reversedPerformer := models.Performer{
		ID:      reversedPerformerID,
		Name:    reversedPerformerName,
		Aliases: models.NewRelatedStrings([]string{}),
	}

	testTables := generateTestTable(performerName, galleryExt)

	assert := assert.New(t)

	for _, test := range testTables {
		db := mocks.NewDatabase()

		db.Performer.On("Query", testCtx, mock.Anything, mock.Anything).Return(nil, 0, nil)
		db.Performer.On("QueryForAutoTag", testCtx, mock.Anything).Return([]*models.Performer{&performer, &reversedPerformer}, nil).Once()

		if test.Matches {
			matchPartial := mock.MatchedBy(func(got models.GalleryPartial) bool {
				expected := models.GalleryPartial{
					PerformerIDs: &models.UpdateIDs{
						IDs:  []int{performerID},
						Mode: models.RelationshipUpdateModeAdd,
					},
				}

				return galleryPartialsEqual(got, expected)
			})
			db.Gallery.On("UpdatePartial", testCtx, galleryID, matchPartial).Return(nil, nil).Once()
		}

		gallery := models.Gallery{
			ID:           galleryID,
			Path:         test.Path,
			PerformerIDs: models.NewRelatedIDs([]int{}),
		}
		err := GalleryPerformers(testCtx, &gallery, db.Gallery, db.Performer, nil)

		assert.Nil(err)
		db.AssertExpectations(t)
	}
}