44import pydantic
55
66from cloud_provider_mdns .base import KubernetesGateway , HTTPRoute , ObjectMeta , HTTPRouteSpec , \
7- ParentReference , HTTPRouteStatus , RouteParentStatus , Condition , BaseNameserver , Record , \
8- KubernetesGatewaySpec , GatewayListenerSpec , KubernetesGatewayStatus , GatewayAddresses
7+ ParentReference , HTTPRouteStatus , HTTPRouteParentStatus , Condition , BaseNameserver , Record , \
8+ KubernetesGatewaySpec , KubernetesGatewayListenerSpec , KubernetesGatewayStatus , KubernetesGatewayAddresses
99from cloud_provider_mdns .registry import Registry
1010
1111@pytest .fixture (scope = 'function' )
@@ -21,8 +21,8 @@ def gateway(registry):
2121 apiVersion = 'gateway.networking.k8s.io/v1' ,
2222 kind = 'Gateway' ,
2323 metadata = ObjectMeta (name = 'gw' , namespace = 'edge' ),
24- spec = KubernetesGatewaySpec (listeners = [GatewayListenerSpec (name = 'https' , port = 443 , protocol = 'HTTPS' )]),
25- status = KubernetesGatewayStatus (addresses = [GatewayAddresses (type = 'IPAddress' , value = '172.18.0.2' )]))
24+ spec = KubernetesGatewaySpec (listeners = [KubernetesGatewayListenerSpec (name = 'https' , port = 443 , protocol = 'HTTPS' )]),
25+ status = KubernetesGatewayStatus (addresses = [KubernetesGatewayAddresses (type = 'IPAddress' , value = '172.18.0.2' )]))
2626
2727@pytest .fixture (scope = 'function' )
2828def route ():
@@ -32,12 +32,12 @@ def route():
3232 metadata = ObjectMeta (name = 'app-route' , namespace = 'app' ),
3333 spec = HTTPRouteSpec (hostnames = ['app.local' ], parentRefs = [ParentReference (namespace = 'edge' , name = 'gw' )]),
3434 status = HTTPRouteStatus (
35- parents = [RouteParentStatus (parentRef = ParentReference (namespace = 'edge' , name = 'gw' ),
36- controllerName = 'istio.io/gateway-controller' ,
37- conditions = [
35+ parents = [HTTPRouteParentStatus (parentRef = ParentReference (namespace = 'edge' , name = 'gw' ),
36+ controllerName = 'istio.io/gateway-controller' ,
37+ conditions = [
3838 Condition (type = 'Accepted' , status = True ),
3939 Condition (type = 'ResolvedRefs' , status = True )
4040 ])
41- ]
41+ ]
4242 )
4343 )
0 commit comments