@@ -85,6 +85,47 @@ func routeBasicTest(t *testing.T, f *framework.Framework, ctx *framework.TestCtx
8585 return nil
8686}
8787
88+ func routePassthroughTest (t * testing.T , f * framework.Framework , ctx * framework.TestCtx ) error {
89+ namespace , err := ctx .GetNamespace ()
90+ if err != nil {
91+ return fmt .Errorf ("could not get namespace: %v" , err )
92+ }
93+
94+ exampleRoute := & routev1.Route {
95+ TypeMeta : metav1.TypeMeta {
96+ Kind : "Route" ,
97+ APIVersion : "route.openshift.io/v1" ,
98+ },
99+ ObjectMeta : metav1.ObjectMeta {
100+ Name : "route-passthrough" ,
101+ Namespace : namespace ,
102+ Annotations : map [string ]string {
103+ "openshift.io/cert-ctl-status" : "new" ,
104+ },
105+ },
106+ Spec : routev1.RouteSpec {
107+ Host : fmt .Sprintf ("route-passthrough.%s.example.com" , namespace ),
108+ TLS : & routev1.TLSConfig {
109+ Termination : routev1 .TLSTerminationPassthrough ,
110+ },
111+ To : routev1.RouteTargetReference {
112+ Kind : "Service" ,
113+ Name : "myservice" ,
114+ },
115+ },
116+ }
117+
118+ // use TestCtx's create helper to create the object and add a cleanup function for the new object
119+ err = f .Client .Create (goctx .TODO (), exampleRoute , & framework.CleanupOptions {TestContext : ctx , Timeout : cleanupTimeout , RetryInterval : cleanupRetryInterval })
120+ if err != nil {
121+ return err
122+ }
123+
124+ assert .Nil (t , waitForAnnotation (t , f , exampleRoute , "openshift.io/cert-ctl-status" , "failed" ))
125+
126+ return nil
127+ }
128+
88129func serviceP12Test (t * testing.T , f * framework.Framework , ctx * framework.TestCtx ) error {
89130 namespace , err := ctx .GetNamespace ()
90131 if err != nil {
@@ -245,6 +286,9 @@ func SetupCluster(t *testing.T) {
245286 if err = routeBasicTest (t , f , ctx ); err != nil {
246287 t .Fatal (err )
247288 }
289+ if err = routePassthroughTest (t , f , ctx ); err != nil {
290+ t .Fatal (err )
291+ }
248292 if err = serviceBasicTest (t , f , ctx ); err != nil {
249293 t .Fatal ("PEM Service" , err )
250294 }
0 commit comments