Fix incorrect uid in AdmissionResponse (#4927)
This commit is contained in:
parent
26f574dc27
commit
e726f25d03
2 changed files with 3 additions and 8 deletions
|
|
@ -24,18 +24,16 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"k8s.io/api/admission/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
type testAdmissionHandler struct{}
|
||||
|
||||
func (testAdmissionHandler) HandleAdmission(ar *v1beta1.AdmissionReview) error {
|
||||
ar.Response = &v1beta1.AdmissionResponse{
|
||||
UID: types.UID(uuid.New().String()),
|
||||
Allowed: true,
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue