package
1.24.0-dev
Repository: https://github.com/go-gitea/gitea.git
Documentation: pkg.go.dev

# Functions

AssertCount assert the count of a bean.
AssertCountByCond test the count of database entries matching bean.
AssertExistsAndLoadBean assert that a bean exists and load it from the test database.
AssertExistsAndLoadMap assert that a row exists and load it from the test database.
AssertExistsIf asserts that a bean exists or does not exist, depending on what is expected.
AssertInt64InRange assert value is in range [low, high].
AssertNotExistsBean assert that a bean does not exist in the test database.
AssertSuccessfulInsert assert that beans is successfully inserted.
BeanExists for testing, check if a bean exists.
CheckConsistencyFor test that all matching database entries are consistent.
Cond create a condition with arguments for a test.
Copy copies file from source to target path.
CreateTestEngine creates a memory database and loads the fixture data from fixturesDir.
FixturesDir returns the fixture directory.
GetCount get the count of a bean.
GetCountByCond get the count of database entries matching bean.
GetXORMEngine gets the XORM engine.
InitFixtures initialize test fixtures for a test database.
InitSettings initializes config provider and load common settings for tests.
LoadBeanIfExists loads beans from fixture database if exist.
LoadFixtures load fixtures for a test database.
MainTest a reusable TestMain(..) function for unit tests that need to use a test database.
OrderBy creates "ORDER BY" a test query.
PrepareTestDatabase load test fixtures into test database.
PrepareTestEnv prepares the environment for unit tests.
Sync synchronizes the two files.
SyncDirs synchronizes files recursively from source to target directory.

# Constants

NonexistentID an ID that will never exist.

# Structs

FixturesOptions fixtures needs to be loaded options.
TestOptions represents test options.