Skip to content

Commit 1e7c4a5

Browse files
committed
Moving is_trusted_xds_server_experimental to client deployment args
pair programming
1 parent 4d3bb70 commit 1e7c4a5

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

framework/test_app/runners/k8s/k8s_xds_client_runner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class ClientDeploymentArgs:
3232
csm_workload_name: str = ""
3333
csm_canonical_service_name: str = ""
3434
enable_dualstack: bool = False
35+
is_trusted_xds_server_experimental: bool = False
3536

3637
def as_dict(self):
3738
return dataclasses.asdict(self)
@@ -131,7 +132,6 @@ def run( # pylint: disable=arguments-differ
131132
log_to_stdout: bool = False,
132133
request_payload_size: int = 0,
133134
response_payload_size: int = 0,
134-
is_trusted_xds_server_experimental: bool = False,
135135
) -> client_app.XdsTestClient:
136136
logger.info(
137137
(
@@ -192,7 +192,6 @@ def run( # pylint: disable=arguments-differ
192192
config_mesh=config_mesh,
193193
generate_mesh_id=generate_mesh_id,
194194
print_response=print_response,
195-
is_trusted_xds_server_experimental=is_trusted_xds_server_experimental,
196195
**self.deployment_args.as_dict(),
197196
)
198197

tests/cloud_run_csm_inbound_test.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,32 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import logging
15+
from typing import TypeAlias
1516

1617
from absl.testing import absltest
18+
from typing_extensions import override
1719

1820
from framework import xds_k8s_testcase
21+
from framework.test_app.runners.k8s import k8s_xds_client_runner
1922
from framework.test_cases import cloud_run_testcase
2023

2124
logger = logging.getLogger(__name__)
2225

23-
_XdsTestServer = xds_k8s_testcase.XdsTestServer
24-
_XdsTestClient = xds_k8s_testcase.XdsTestClient
26+
_XdsTestServer: TypeAlias = xds_k8s_testcase.XdsTestServer
27+
_XdsTestClient: TypeAlias = xds_k8s_testcase.XdsTestClient
28+
KubernetesClientRunner: TypeAlias = k8s_xds_client_runner.KubernetesClientRunner
29+
ClientDeploymentArgs: TypeAlias = k8s_xds_client_runner.ClientDeploymentArgs
2530

2631

2732
class CloudRunCsmInboundTest(cloud_run_testcase.CloudRunXdsKubernetesTestCase):
33+
@override
34+
def initKubernetesClientRunner(self, **kwargs) -> KubernetesClientRunner:
35+
return super().initKubernetesClientRunner(
36+
deployment_args=ClientDeploymentArgs(
37+
is_trusted_xds_server_experimental=True,
38+
)
39+
)
40+
2841
def test_gke_to_cloud_run(self):
2942
with self.subTest("0_create_mesh"):
3043
self.td.create_mesh()
@@ -54,7 +67,6 @@ def test_gke_to_cloud_run(self):
5467
test_client: _XdsTestClient = self.startSecureTestClient(
5568
test_server,
5669
config_mesh=self.td.mesh.name,
57-
is_trusted_xds_server_experimental=True,
5870
)
5971

6072
with self.subTest("7_test_client_xds_config_exists"):

0 commit comments

Comments
 (0)