Skip to content

Commit 4bac500

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 <[email protected]> (cherry picked from commit dfbac70) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent a2e17eb commit 4bac500

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

cli-plugins/manager/candidate_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ func TestValidateCandidate(t *testing.T) {
3636
builtinName = metadata.NamePrefix + "builtin"
3737
builtinAlias = metadata.NamePrefix + "alias"
3838

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}`
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
4342
)
4443

4544
fakeroot := &cobra.Command{Use: "docker"}
@@ -72,7 +71,8 @@ func TestValidateCandidate(t *testing.T) {
7271
{name: "empty vendor", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{"SchemaVersion": "0.1.0", "Vendor": ""}`}, invalid: "plugin metadata does not define a vendor"},
7372
// This one should work
7473
{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}},
74+
// Including the deprecated "experimental" field should not break processing.
75+
{name: "with legacy experimental", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{"SchemaVersion": "0.1.0", "Vendor": "e2e-testing", "Experimental": true}`}},
7676
} {
7777
t.Run(tc.name, func(t *testing.T) {
7878
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)