do not re-use err

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
pull/9782/head
Josh Dolitsky 4 years ago
parent 1809cc0509
commit 31588e7908
No known key found for this signature in database
GPG Key ID: B2B93673243A65FB

@ -45,8 +45,7 @@ func TestDependencyBuildCmd(t *testing.T) {
ociChartName := "oci-depending-chart"
c := createTestingMetadataForOCI(ociChartName, ociSrv.RegistryURL)
_, err = chartutil.Save(c, ociSrv.Dir)
if err != nil {
if _, err := chartutil.Save(c, ociSrv.Dir); err != nil {
t.Fatal(err)
}
ociSrv.Run(t, repotest.WithDependingChart(c))
@ -137,8 +136,7 @@ func TestDependencyBuildCmd(t *testing.T) {
}
// OCI dependencies
err = chartutil.SaveDir(c, dir())
if err != nil {
if err := chartutil.SaveDir(c, dir()); err != nil {
t.Fatal(err)
}
cmd = fmt.Sprintf("dependency build '%s' --repository-config %s --repository-cache %s --registry-config %s/config.json",

@ -47,8 +47,7 @@ func TestDependencyUpdateCmd(t *testing.T) {
ociChartName := "oci-depending-chart"
c := createTestingMetadataForOCI(ociChartName, ociSrv.RegistryURL)
_, err = chartutil.Save(c, ociSrv.Dir)
if err != nil {
if _, err := chartutil.Save(c, ociSrv.Dir); err != nil {
t.Fatal(err)
}
ociSrv.Run(t, repotest.WithDependingChart(c))
@ -135,8 +134,7 @@ func TestDependencyUpdateCmd(t *testing.T) {
}
// test for OCI charts
err = chartutil.SaveDir(c, dir())
if err != nil {
if err := chartutil.SaveDir(c, dir()); err != nil {
t.Fatal(err)
}
cmd := fmt.Sprintf("dependency update '%s' --repository-config %s --repository-cache %s --registry-config %s/config.json",

Loading…
Cancel
Save