tree: 3b3dcdfe679f4e457e9acc33be6db1af6111c4fb
  1. e2e/
  2. helper/
  3. init.go
  4. Readme.md
backend/test/Readme.md

Directory structure explanation

  • e2e/: Contains DevLake-server tests that interact with either fake plugins or no plugins at all.
  • integration/: Contains DevLake-server tests written against real data-sources which contain test data.

Running E2E tests locally

Start a MySQL instance and create a test database that the merico user can access. The database URL must use 127.0.0.1 instead of localhost because some Python dependencies do not resolve localhost correctly.

export E2E_DB_URL='mysql://merico:merico@127.0.0.1:3306/lake_test?charset=utf8mb4&parseTime=True'

cd backend
go run ./test/init.go
make e2e-test

The service E2E tests compile the gitextractor plugin, which links against libgit2. If libgit2 is installed in a non-standard location, expose it through pkg-config and add an rpath so the test binary can load the dynamic library at runtime:

export PKG_CONFIG_PATH=/path/to/libgit2/build
export CGO_LDFLAGS='-L/path/to/libgit2/build -Wl,-rpath,/path/to/libgit2/build'
make e2e-test