Fix struct declaration

Signed-off-by: Faraz Khawaja <khwajafarazahmed@yahoo.com>
Signed-off-by: Khwaja Faraz Ahmed <khwaja.ahmed@securiti.ai>
pull/31058/head
Faraz Khawaja 2 months ago committed by Khwaja Faraz Ahmed
parent f75100266b
commit 2d2d4a868d

@ -32,11 +32,11 @@ import (
) )
// unreachableKubeClient is a test client that always returns an error for IsReachable // unreachableKubeClient is a test client that always returns an error for IsReachable
type unreachableKubeClientForMetadata struct { type unreachableKubeClient struct {
kubefake.PrintingKubeClient kubefake.PrintingKubeClient
} }
func (u *unreachableKubeClientForMetadata) IsReachable() error { func (u *unreachableKubeClient) IsReachable() error {
return errors.New("connection refused") return errors.New("connection refused")
} }
@ -294,7 +294,7 @@ func TestGetMetadata_Run_DifferentStatuses(t *testing.T) {
func TestGetMetadata_Run_UnreachableKubeClient(t *testing.T) { func TestGetMetadata_Run_UnreachableKubeClient(t *testing.T) {
cfg := actionConfigFixture(t) cfg := actionConfigFixture(t)
cfg.KubeClient = &unreachableKubeClientForMetadata{ cfg.KubeClient = &unreachableKubeClient{
PrintingKubeClient: kubefake.PrintingKubeClient{Out: io.Discard}, PrintingKubeClient: kubefake.PrintingKubeClient{Out: io.Discard},
} }

@ -17,7 +17,6 @@ limitations under the License.
package action package action
import ( import (
"errors"
"io" "io"
"testing" "testing"
@ -29,15 +28,6 @@ import (
release "helm.sh/helm/v4/pkg/release/v1" release "helm.sh/helm/v4/pkg/release/v1"
) )
// unreachableKubeClient is a test client that always returns an error for IsReachable
type unreachableKubeClient struct {
kubefake.PrintingKubeClient
}
func (u *unreachableKubeClient) IsReachable() error {
return errors.New("connection refused")
}
func TestNewGetValues(t *testing.T) { func TestNewGetValues(t *testing.T) {
cfg := actionConfigFixture(t) cfg := actionConfigFixture(t)
client := NewGetValues(cfg) client := NewGetValues(cfg)

Loading…
Cancel
Save