it

package
v19.4.0-rc43 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 4 Imported by: 0

README

Integration tests

Integration tests use test containers and start:

  • K3s container to provide a Kubernetes instance.
  • Redis

kas is started as a container, agentk is deployed as a Pod into Kubernetes. Both come from an image Bazel builds (see BUILD.bazel) and the tests load into the Docker daemon, picking the build that matches the daemon's architecture. kas runs under the race detector when the image has a race-instrumented build, which needs cgo and so only exists on a Linux host of the daemon's architecture.

Running

From command line, together with the other integration tests or alone:

make test-it
bazel test --config=e2e --test_env=RUN_IT=true //internal/it:it_test

The suite is a manual Bazel target, so //... patterns skip it and its image build.

If test containers cannot find your Docker-compatible endpoint, set the DOCKER_HOST environment variable.

Debugging

You can also run/debug the tests from your favorite IDE. Outside bazel test the image tarball is missing, so build it and link it into this directory first, for the daemon's architecture:

bazel build //internal/it:agentk_and_kas_linux_arm64_tar
ln -s "$(bazel info bazel-bin)/internal/it/agentk_and_kas_linux_arm64" internal/it/

Note that debugger will be attached to the test process, not to kas or agentk processes. It might be possible to attach a debugger to those too, but it's likely more complicated than setting it all up with GDK.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitLabAPI

type GitLabAPI interface {
	GetAgentkInfo(http.ResponseWriter, *http.Request)
	GetAgentwInfo(http.ResponseWriter, *http.Request)
	GetRunnercInfo(http.ResponseWriter, *http.Request)
	GetRunnerInfo(http.ResponseWriter, *http.Request)
	GetAutoFlowModuleInfo(http.ResponseWriter, *http.Request)
	GetVersion(http.ResponseWriter, *http.Request)
	GetCIJobs(http.ResponseWriter, *http.Request)
	GetRunnerControllersForJobAdmission(http.ResponseWriter, *http.Request)
	UpdateCIJob(http.ResponseWriter, *http.Request)
	PostAgentConfiguration(http.ResponseWriter, *http.Request)
	GetAllowedAgents(http.ResponseWriter, *http.Request)
	AuthorizeProxyUser(http.ResponseWriter, *http.Request)
	GetReceptiveAgents(http.ResponseWriter, *http.Request)
}

type GitalyAPI

GitalyAPI is a subset of gitalypb.CommitServiceServer. We cannot generate a mock for the real interface since it has a private method. So, have to have this crutch. See https://github.com/uber-go/mock/issues/64.

Jump to

Keyboard shortcuts

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