testutils

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgContainerSuite

type PgContainerSuite struct {
	suite.Suite

	Container     testcontainers.Container
	MigrationUp   string
	MigrationDown string
	// contains filtered or unexported fields
}

func (*PgContainerSuite) GetConnection

func (s *PgContainerSuite) GetConnection(ctx context.Context) (
	conn *pgx.Conn, err error,
)

func (*PgContainerSuite) GetConnectionWithUser

func (s *PgContainerSuite) GetConnectionWithUser(ctx context.Context, username, password string) (
	conn *pgx.Conn, err error,
)

func (*PgContainerSuite) GetSuperUser

func (s *PgContainerSuite) GetSuperUser() string

func (*PgContainerSuite) MigrateDown

func (s *PgContainerSuite) MigrateDown(ctx context.Context)

func (*PgContainerSuite) MigrateUp

func (s *PgContainerSuite) MigrateUp(ctx context.Context)

func (*PgContainerSuite) SetMigrationDown

func (s *PgContainerSuite) SetMigrationDown(sql string) *PgContainerSuite

func (*PgContainerSuite) SetMigrationUp

func (s *PgContainerSuite) SetMigrationUp(sql string) *PgContainerSuite

func (*PgContainerSuite) SetupSuite

func (s *PgContainerSuite) SetupSuite()

func (*PgContainerSuite) TearDownSuite

func (s *PgContainerSuite) TearDownSuite()

type StorageMock

type StorageMock struct {
	mock.Mock
}

func (*StorageMock) Delete

func (s *StorageMock) Delete(ctx context.Context, filePaths ...string) error

func (*StorageMock) DeleteAll

func (s *StorageMock) DeleteAll(ctx context.Context, pathPrefix string) error

func (*StorageMock) Dirname

func (s *StorageMock) Dirname() string

func (*StorageMock) Exists

func (s *StorageMock) Exists(ctx context.Context, fileName string) (bool, error)

func (*StorageMock) GetCwd

func (s *StorageMock) GetCwd() string

func (*StorageMock) GetObject

func (s *StorageMock) GetObject(ctx context.Context, filePath string) (reader io.ReadCloser, err error)

func (*StorageMock) ListDir

func (s *StorageMock) ListDir(ctx context.Context) (files []string, dirs []storages.Storager, err error)

func (*StorageMock) PutObject

func (s *StorageMock) PutObject(ctx context.Context, filePath string, body io.Reader) error

func (*StorageMock) Stat

func (s *StorageMock) Stat(fileName string) (*domains.ObjectStat, error)

func (*StorageMock) SubStorage

func (s *StorageMock) SubStorage(subPath string, relative bool) storages.Storager

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL