e2e/testutils: fix incorrect use of PluginConfigInterface

This code was using the type incorrectly; current versions of the
API MarshalText ignore this mistake, but the moby/moby/api module
produces an error:

    === Failed
    === FAIL: e2e/global TestPromptExitCode/plugin_install (0.28s)
        cli_test.go:203: assertion failed: error is not nil: json: error calling MarshalText for type plugin.CapabilityID: capability "docker.dummy/1.0" cannot contain a dot

    === FAIL: e2e/global TestPromptExitCode/plugin_upgrade (0.26s)
        cli_test.go:203: assertion failed: error is not nil: json: error calling MarshalText for type plugin.CapabilityID: capability "docker.dummy/1.0" cannot contain a dot

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-08-20 22:00:06 +02:00
parent 5184f2ed65
commit 39e1213615
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,11 @@ func SetupPlugin(t *testing.T, ctx context.Context) *fs.Dir {
},
Interface: types.PluginConfigInterface{
Socket: "basic.sock",
Types: []types.PluginInterfaceType{{Capability: "docker.dummy/1.0"}},
Types: []types.PluginInterfaceType{{
Capability: "dummy",
Prefix: "docker",
Version: "1.0",
}},
},
Entrypoint: []string{"/basic"},
}