Documentation
¶
Index ¶
- Constants
- func Check(t *testing.T, err error)
- func Checkf(t *testing.T, err error, format string, args ...any)
- func GenerateLayersMetaFile(t *testing.T, appsRootDir string) string
- func NewTestConfig(t *testing.T) *compose.Config
- func PublishDerivedImage(t *testing.T, base string, sizeMB int) string
- func PublishDerivedImageOfFiles(t *testing.T, base string, files int) string
- func RunCmd(t *testing.T, args ...string) []byte
- func RunCmdExpectFail(t *testing.T, appDir string, args ...string) []byte
- func RunCmdOffline(t *testing.T, args ...string) ([]byte, error)
- func WithAppBundleIndexes(enableAppBundleIndexes bool) func(opts *PublishOpts)
- func WithLayersManifest(addLayerManifest bool) func(opts *PublishOpts)
- func WithRegistry(registry string) func(opts *PublishOpts)
- type App
- func (a *App) CheckFetched(t *testing.T)
- func (a *App) CheckInstalled(t *testing.T)
- func (a *App) CheckRunning(t *testing.T)
- func (a *App) GetAppImageManifest(t *testing.T, image string) (imageManifest ocischema.Manifest)
- func (a *App) GetAppImages(t *testing.T) []string
- func (a *App) GetAppImagesFromAppStore(t *testing.T) []string
- func (a *App) GetInstallCheckRes(t *testing.T) (checkRes *composectl.AppInstallCheckResult)
- func (a *App) GetRunningStatus(t *testing.T) (appStatus *composectl.App)
- func (a *App) Install(t *testing.T)
- func (a *App) Publish(t *testing.T, publishOpts ...func(*PublishOpts))
- func (a *App) Pull(t *testing.T)
- func (a *App) PullAppImagesWithSkopeo(t *testing.T)
- func (a *App) PullWithWorkers(t *testing.T, workers int)
- func (a *App) Remove(t *testing.T)
- func (a *App) Run(t *testing.T)
- func (a *App) Stop(t *testing.T)
- func (a *App) Uninstall(t *testing.T)
- func (a *App) Up(t *testing.T)
- type PublishOpts
Constants ¶
const ( // On the mount of the test dockerd's containerd: an install hardlinks the store's layers into it. AppStoreRoot = "/var/lib/docker/reset-apps" AppComposeRootRoot = "/var/sota/compose-apps" )
Variables ¶
This section is empty.
Functions ¶
func PublishDerivedImage ¶
PublishDerivedImage builds an image on top of base with one layer of sizeMB random bytes and pushes it to the test registry through the publisher dockerd, which the publish step reads the image layers from. It returns the image reference.
func PublishDerivedImageOfFiles ¶
PublishDerivedImageOfFiles is PublishDerivedImage with a layer of the given number of small files: its extraction takes a syscall per file, not a disk write, so it stays slow on a fast disk.
func RunCmd ¶
RunCmd runs composectl with the given arguments from the current directory and fails the test unless it exits 0. It returns the combined output.
func RunCmdExpectFail ¶
RunCmdExpectFail runs composectl with the given args and fails the test unless the command exits with a non-zero status. It returns the combined output so the caller can assert on the user-facing error message.
func RunCmdOffline ¶
RunCmdOffline runs composectl with the given args through an unreachable proxy, so every registry request fails. It returns the combined output and the command's error.
func WithAppBundleIndexes ¶
func WithAppBundleIndexes(enableAppBundleIndexes bool) func(opts *PublishOpts)
func WithLayersManifest ¶
func WithLayersManifest(addLayerManifest bool) func(opts *PublishOpts)
func WithRegistry ¶
func WithRegistry(registry string) func(opts *PublishOpts)
Types ¶
type App ¶
func (*App) CheckFetched ¶
func (*App) CheckInstalled ¶
func (*App) CheckRunning ¶
func (*App) GetAppImageManifest ¶
func (*App) GetAppImagesFromAppStore ¶
func (*App) GetInstallCheckRes ¶
func (a *App) GetInstallCheckRes(t *testing.T) (checkRes *composectl.AppInstallCheckResult)
func (*App) GetRunningStatus ¶
func (a *App) GetRunningStatus(t *testing.T) (appStatus *composectl.App)