22import unittest
33
44from crossplane .function import logging , resource
5- from crossplane .function .proto .v1beta1 import run_function_pb2 as fnv1beta1
5+ from crossplane .function .proto .v1 import run_function_pb2 as fnv1
66from google .protobuf import duration_pb2 as durationpb
77from google .protobuf import json_format
88from google .protobuf import struct_pb2 as structpb
@@ -21,21 +21,21 @@ async def test_run_function(self) -> None:
2121 @dataclasses .dataclass
2222 class TestCase :
2323 reason : str
24- req : fnv1beta1 .RunFunctionRequest
25- want : fnv1beta1 .RunFunctionResponse
24+ req : fnv1 .RunFunctionRequest
25+ want : fnv1 .RunFunctionResponse
2626
2727 cases = [
2828 TestCase (
2929 reason = "The function should return the input as a result." ,
30- req = fnv1beta1 .RunFunctionRequest (
30+ req = fnv1 .RunFunctionRequest (
3131 input = resource .dict_to_struct ({"example" : "Hello, world" })
3232 ),
33- want = fnv1beta1 .RunFunctionResponse (
34- meta = fnv1beta1 .ResponseMeta (ttl = durationpb .Duration (seconds = 60 )),
35- desired = fnv1beta1 .State (),
33+ want = fnv1 .RunFunctionResponse (
34+ meta = fnv1 .ResponseMeta (ttl = durationpb .Duration (seconds = 60 )),
35+ desired = fnv1 .State (),
3636 results = [
37- fnv1beta1 .Result (
38- severity = fnv1beta1 .SEVERITY_NORMAL ,
37+ fnv1 .Result (
38+ severity = fnv1 .SEVERITY_NORMAL ,
3939 message = "I was run with input Hello, world!" ,
4040 )
4141 ],
0 commit comments