File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
runtime/processor/binding Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ package binding
15
15
16
16
import (
17
17
"context"
18
- "crypto/x509"
19
18
"io"
20
19
"net/http"
21
20
"testing"
@@ -45,6 +44,7 @@ import (
45
44
"github.com/dapr/dapr/pkg/security"
46
45
daprt "github.com/dapr/dapr/pkg/testing"
47
46
testinggrpc "github.com/dapr/dapr/pkg/testing/grpc"
47
+ "github.com/dapr/kit/crypto/spiffe"
48
48
"github.com/dapr/kit/logger"
49
49
)
50
50
@@ -184,8 +184,8 @@ func TestGetSubscribedBindingsGRPC(t *testing.T) {
184
184
ControlPlaneTrustDomain : "test.example.com" ,
185
185
ControlPlaneNamespace : "default" ,
186
186
MTLSEnabled : false ,
187
- OverrideCertRequestFn : func (context.Context , []byte ) ([] * x509. Certificate , error ) {
188
- return [] * x509. Certificate { nil } , nil
187
+ OverrideCertRequestFn : func (context.Context , []byte ) (* spiffe. SVIDResponse , error ) {
188
+ return nil , nil
189
189
},
190
190
Healthz : healthz .New (),
191
191
})
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import (
33
33
"github.com/stretchr/testify/require"
34
34
35
35
"github.com/dapr/dapr/pkg/healthz"
36
+ "github.com/dapr/kit/crypto/spiffe"
36
37
)
37
38
38
39
func Test_Start (t * testing.T ) {
@@ -97,8 +98,10 @@ func Test_Start(t *testing.T) {
97
98
ControlPlaneTrustDomain : "test.example.com" ,
98
99
ControlPlaneNamespace : "default" ,
99
100
MTLSEnabled : true ,
100
- OverrideCertRequestFn : func (context.Context , []byte ) ([]* x509.Certificate , error ) {
101
- return []* x509.Certificate {workloadCert }, nil
101
+ OverrideCertRequestFn : func (context.Context , []byte ) (* spiffe.SVIDResponse , error ) {
102
+ return & spiffe.SVIDResponse {
103
+ X509Certificates : []* x509.Certificate {workloadCert },
104
+ }, nil
102
105
},
103
106
Healthz : healthz .New (),
104
107
})
You can’t perform that action at this time.
0 commit comments