Fixed descriptions and tests

Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
pull/31615/head
MrJack 4 months ago
parent 757980296e
commit b13f5de34d

@ -220,8 +220,8 @@ func TestVCSInstallerUpdateWithVersion(t *testing.T) {
t.Fatal(err)
}
// Now test update with specific version constraint
vcsInstaller.Version = "~0.1.0"
// Now test update with specific version
vcsInstaller.Version = "0.1.1"
if err := Update(vcsInstaller); err != nil {
t.Fatal(err)
}
@ -229,7 +229,7 @@ func TestVCSInstallerUpdateWithVersion(t *testing.T) {
t.Fatalf("expected version '0.1.1', got %q", repo.current)
}
// Test update with different version constraint
// Test update with different version
vcsInstaller.Version = "0.2.0"
if err := Update(vcsInstaller); err != nil {
t.Fatal(err)

@ -39,7 +39,7 @@ const pluginUpdateDesc = `Update one or more Helm plugins.
An exact semver version can be supplied per-plugin using the @version syntax:
helm plugin update myplugin@1.2.3 otherplugin@2.0.0
helm plugin update myplugin@v1.0.0
helm plugin update myplugin@1.0.0
Range constraints (e.g. ~1.2, ^1.0.0, >=1.0.0, v1.0.0) are not supported.
@ -86,7 +86,7 @@ func (o *pluginUpdateOptions) complete(args []string) error {
}
if version != "" {
if _, err := semver.StrictNewVersion(version); err != nil {
return fmt.Errorf("invalid version %q for plugin %q: must be an exact semver version (e.g. 1.2.3)", version, name)
return fmt.Errorf("invalid version %q for plugin %q: must be an exact semver version (e.g. 1.2.3); the 'v' prefix is not allowed", version, name)
}
}
o.plugins[name] = version

Loading…
Cancel
Save