MCPcopy Create free account
hub / github.com/ddev/ddev / TestGetCLIPlugins

Function TestGetCLIPlugins

pkg/dockerutil/requirements_test.go:33–47  ·  view source on GitHub ↗

TestGetCLIPlugins tests that Docker CLI plugins can be discovered.

(t *testing.T)

Source from the content-addressed store, hash-verified

31
32// TestGetCLIPlugins tests that Docker CLI plugins can be discovered.
33func TestGetCLIPlugins(t *testing.T) {
34 plugins, err := dockerutil.GetCLIPlugins()
35 require.NoError(t, err)
36 require.NotEmpty(t, plugins, "expected at least one CLI plugin to be installed")
37
38 // buildx should be among the discovered plugins
39 found := false
40 for _, p := range plugins {
41 if p.Name == "buildx" {
42 found = true
43 break
44 }
45 }
46 require.True(t, found, "expected 'buildx' to be among discovered CLI plugins")
47}
48
49// TestGetBuildxVersion tests that the buildx version can be retrieved.
50func TestGetBuildxVersion(t *testing.T) {

Callers

nothing calls this directly

Calls 1

GetCLIPluginsFunction · 0.92

Tested by

no test coverage detected