Skip to content

Commit

Permalink
fix: csr test because type meta is emptytrivy-action
Browse files Browse the repository at this point in the history
  • Loading branch information
vie-serendipity committed Nov 7, 2024
1 parent c7d9f1e commit 06b0a57
Show file tree
Hide file tree
Showing 5 changed files with 864 additions and 892 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ func TestReconcile(t *testing.T) {
csrV1Supported: true,
skipRequest: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "server-csr",
Namespace: "default",
Expand Down Expand Up @@ -134,10 +131,7 @@ func TestReconcile(t *testing.T) {
csrV1Supported: false,
skipRequest: true,
expectedObj: &certificatesv1beta1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1beta1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "node-client-csr",
Namespace: "default",
Expand Down Expand Up @@ -189,10 +183,7 @@ func TestReconcile(t *testing.T) {
csrV1Supported: true,
skipRequest: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "tunnel-server-csr",
Namespace: "default",
Expand Down Expand Up @@ -238,10 +229,7 @@ func TestReconcile(t *testing.T) {
csrV1Supported: true,
skipRequest: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "tunnel-server-proxy-client-csr",
Namespace: "default",
Expand Down Expand Up @@ -287,10 +275,7 @@ func TestReconcile(t *testing.T) {
csrV1Supported: true,
skipRequest: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "tunnel-agent-client-csr",
Namespace: "default",
Expand Down Expand Up @@ -332,10 +317,7 @@ func TestReconcile(t *testing.T) {
},
csrV1Supported: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "server-csr",
Namespace: "default",
Expand Down Expand Up @@ -364,10 +346,7 @@ func TestReconcile(t *testing.T) {
},
csrV1Supported: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "server-csr",
Namespace: "default",
Expand Down Expand Up @@ -399,10 +378,7 @@ func TestReconcile(t *testing.T) {
},
csrV1Supported: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "server-csr",
Namespace: "default",
Expand Down Expand Up @@ -448,10 +424,7 @@ func TestReconcile(t *testing.T) {
csrV1Supported: true,
skipRequest: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "server-csr",
Namespace: "default",
Expand Down Expand Up @@ -507,10 +480,7 @@ func TestReconcile(t *testing.T) {
csrV1Supported: true,
skipRequest: true,
expectedObj: &certificatesv1.CertificateSigningRequest{
TypeMeta: metav1.TypeMeta{
Kind: "CertificateSigningRequest",
APIVersion: "certificates.k8s.io/v1",
},
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: "server-csr",
Namespace: "default",
Expand Down
Loading

0 comments on commit 06b0a57

Please sign in to comment.