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: migration_56_test.go
    path of file: ./repos/shellhub/api/store/mongo/migrations
    
    the code of the file until where you have to start completion: package migrations

import (
	"context"
	"errors"
	"testing"

	"github.com/shellhub-io/shellhub/api/pkg/dbtest"
	"github.com/sirupsen/logrus"
	"github.com/stretchr/testify/assert"
	migrate "github.com/xakep666/mongo-migrate"
	"go.mongodb.org/mongo-driver/bson"
)

func TestMigration56(t *testing.T) {
	logrus.Info("Testing Migration 56")

	const field string = "public_url_address"

	db := dbtest.DBServer{}
	defer db.Stop()

	cases := []struct {
		description string
		test        func() error
	}{
		{
			"Success to apply up on migration 56",
			func() error {
				migrations := GenerateMigrations()[55:56]
				migrates := migrate.NewMigrate(db.Client().Database("test"), migrations...)
				err := migrates.Up(migrate.AllAvailable)
				if err != nil {
					return err
				}

				cursor, err := db.Client().Database("test").Collection("devices").Indexes().List(context.Background())
				if err != nil {
					return err
				}

				var found bool
				for cursor.Next(context.Background()) {
					var index bson.M
					if err := cursor.Decode(&index); err != nil {
						return err
					}

					if index["name"] == field {
						found = true
					}
				}

				if !found {
					return errors.New("index not created")
				}

				return nil
			},
		},
		{
			"Success to apply down on migration 56",
			func() error {
				migrations := GenerateMigrations()[55:56]
				migrates := migrate.NewMigrate(db.Client().Database("test"), migrations...)
				err := migrates.Dow
    
func TestMigration56(t *testing.T) {
	logrus.Info("Testing Migration 56")

	const field string = "public_url_address"

	db := dbtest.DBServer{}
	defer db.Stop()

	cases := []struct {
		description string
		test        func() error
	}{
		{
			"Success to apply up on migration 56",
			func() error {
				migrations := GenerateMigrations()[55:56]
				migrates := migrate.NewMigrate(db.Client().Database("test"), migrations...)
				err := migrates.Up(migrate.AllAvailable)
				if err != nil {
					return err
				}

				cursor, err := db.Client().Database("test").Collection("devices").Indexes().List(context.Background())
				if err != nil {
					return err
				}

				var found bool
				for cursor.Next(context.Background()) {
					var index bson.M
					if err := cursor.Decode(&index); err != nil {
						return err
					}

					if index["name"] == field {
						found = true
					}
				}

				if !found {
					return errors.New("index not created")
				}

				return nil
			},
		},
		{
			"Success to apply down on migration 56",
			func() error {
				migrations := GenerateMigrations()[55:56]
				migrates := migrate.NewMigrate(db.Client().Database("test"), migrations...)
				err := migrates.Down(migrate.AllAvailable)
				if err != nil {
					return err
				}

				cursor, err := db.Client().Database("test").Collection("devices").Indexes().List(context.Background())
				if err != nil {
					return errors.New("index not dropped")
				}

				var found bool
				for cursor.Next(context.Background()) {
					var index bson.M
					if err := cursor.Decode(&index); err != nil {
						return err
					}

					if index["name"] == field {
						found = true
					}
				}

				if found {
					return errors.New("index not dropped")
				}

				return nil
			},
		},
	}

	for _, test := range cases {
		tc := test
		t.Run(tc.description, func(t *testing.T) {
			err := tc.test()
			assert.NoError(t, err)
		})
	}
}