@@ -7,12 +7,9 @@ import (
7
7
"github.com/google/go-cmp/cmp"
8
8
"github.com/google/go-cmp/cmp/cmpopts"
9
9
"google.golang.org/protobuf/testing/protocmp"
10
- "google.golang.org/protobuf/types/known/durationpb"
11
10
12
11
"github.com/crossplane/crossplane-runtime/pkg/logging"
13
12
fnv1beta1 "github.com/crossplane/function-sdk-go/proto/v1beta1"
14
- "github.com/crossplane/function-sdk-go/resource"
15
- "github.com/crossplane/function-sdk-go/response"
16
13
)
17
14
18
15
func TestRunFunction (t * testing.T ) {
@@ -31,30 +28,7 @@ func TestRunFunction(t *testing.T) {
31
28
args args
32
29
want want
33
30
}{
34
- "ResponseIsReturned" : {
35
- reason : "The Function should return a fatal result if no input was specified" ,
36
- args : args {
37
- req : & fnv1beta1.RunFunctionRequest {
38
- Meta : & fnv1beta1.RequestMeta {Tag : "hello" },
39
- Input : resource .MustStructJSON (`{
40
- "apiVersion": "template.fn.crossplane.io/v1beta1",
41
- "kind": "Input",
42
- "example": "Hello, world"
43
- }` ),
44
- },
45
- },
46
- want : want {
47
- rsp : & fnv1beta1.RunFunctionResponse {
48
- Meta : & fnv1beta1.ResponseMeta {Tag : "hello" , Ttl : durationpb .New (response .DefaultTTL )},
49
- Results : []* fnv1beta1.Result {
50
- {
51
- Severity : fnv1beta1 .Severity_SEVERITY_NORMAL ,
52
- Message : "I was run with input \" Hello, world\" !" ,
53
- },
54
- },
55
- },
56
- },
57
- },
31
+ // TODO: Add test cases.
58
32
}
59
33
60
34
for name , tc := range cases {
0 commit comments