TestGetCLIPlugins tests that Docker CLI plugins can be discovered.
(t *testing.T)
| 31 | |
| 32 | // TestGetCLIPlugins tests that Docker CLI plugins can be discovered. |
| 33 | func 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. |
| 50 | func TestGetBuildxVersion(t *testing.T) { |
nothing calls this directly
no test coverage detected