Skip to content

Commit 6853c8d

Browse files
committed
remove some remnants from CLI "experimental" config option
Experimental is always enabled (977d3ae), and the `Experimental` field in plugin metadata was deprecated in 977d3ae and removed in commit 6a50c4f. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent f86ad2e commit 6853c8d

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

cli-plugins/manager/candidate_test.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ func (c *fakeCandidate) Metadata() ([]byte, error) {
3232
func TestValidateCandidate(t *testing.T) {
3333
const (
3434
goodPluginName = metadata.NamePrefix + "goodplugin"
35-
36-
builtinName = metadata.NamePrefix + "builtin"
37-
builtinAlias = metadata.NamePrefix + "alias"
38-
39-
badPrefixPath = "/usr/local/libexec/cli-plugins/wobble"
40-
badNamePath = "/usr/local/libexec/cli-plugins/docker-123456"
41-
goodPluginPath = "/usr/local/libexec/cli-plugins/" + goodPluginName
42-
metaExperimental = `{"SchemaVersion": "0.1.0", "Vendor": "e2e-testing", "Experimental": true}`
35+
builtinName = metadata.NamePrefix + "builtin"
36+
builtinAlias = metadata.NamePrefix + "alias"
37+
badPrefixPath = "/usr/local/libexec/cli-plugins/wobble"
38+
badNamePath = "/usr/local/libexec/cli-plugins/docker-123456"
39+
goodPluginPath = "/usr/local/libexec/cli-plugins/" + goodPluginName
40+
pluginMetadata = `{"SchemaVersion": "0.1.0", "Vendor": "e2e-testing"}`
4341
)
4442

4543
fakeroot := &cobra.Command{Use: "docker"}
@@ -72,7 +70,7 @@ func TestValidateCandidate(t *testing.T) {
7270
{name: "empty vendor", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{"SchemaVersion": "0.1.0", "Vendor": ""}`}, invalid: "plugin metadata does not define a vendor"},
7371
// This one should work
7472
{name: "valid", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{"SchemaVersion": "0.1.0", "Vendor": "e2e-testing"}`}},
75-
{name: "experimental + allowing experimental", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: metaExperimental}},
73+
{name: "valid metadata", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: pluginMetadata}},
7674
} {
7775
t.Run(tc.name, func(t *testing.T) {
7876
p, err := newPlugin(tc.c, fakeroot.Commands())

e2e/internal/fixtures/fixtures.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ func SetupConfigWithNotaryURL(t *testing.T, path, notaryURL string) fs.Dir {
4444
"%s": {
4545
"auth": "ZWlhaXM6cGFzc3dvcmQK"
4646
}
47-
},
48-
"experimental": "enabled"
47+
}
4948
}
5049
`, notaryURL)), fs.WithDir("trust", fs.WithDir("private")))
5150
return *dir

0 commit comments

Comments
 (0)