Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
fix yurtappset fuzzer (#134)
Browse files Browse the repository at this point in the history
Few imports were missing leading to build failures in OSS-Fuzz
  • Loading branch information
kyakdan committed Jan 10, 2023
1 parent a0346e5 commit d363b43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/fuzz/yurtappset_fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ package yurtappset

import (
"context"
"fmt"

fuzz "github.com/AdaLogics/go-fuzz-headers"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/record"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/yaml"

appsv1alpha1 "github.com/openyurtio/yurt-app-manager/pkg/yurtappmanager/apis/apps/v1alpha1"
"github.com/openyurtio/yurt-app-manager/pkg/yurtappmanager/controller/yurtappset/adapter"
Expand Down Expand Up @@ -60,7 +63,6 @@ func GetUnstructured(f *fuzz.ConsumeFuzzer) (*unstructured.Unstructured, error)
return &unstructured.Unstructured{Object: obj}, nil
}


func validateUnstructured(unstr *unstructured.Unstructured) error {
if _, ok := unstr.Object["kind"]; !ok {
return fmt.Errorf("invalid unstr")
Expand Down

0 comments on commit d363b43

Please sign in to comment.