Skip to content

Commit

Permalink
Override compute_api_version flag default instead of hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiitk committed Apr 27, 2024
1 parent f3a5a31 commit 107a1a0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions tests/subsetting_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
from absl import flags
from absl import logging
from absl.testing import absltest
from typing_extensions import override

from framework import xds_k8s_testcase
from framework.helpers import skips

flags.adopt_module_key_flags(xds_k8s_testcase)
# Change the default value of --compute_api_version to v1alpha.
# Subsetting test requires Compute v1alpha APIs.
# Can be tested with another API version if the flag is passed to the test.
flags.set_default(xds_k8s_testcase.xds_flags.COMPUTE_API_VERSION, "v1alpha")

# Type aliases
_XdsTestServer = xds_k8s_testcase.XdsTestServer
Expand All @@ -35,14 +38,6 @@


class SubsettingTest(xds_k8s_testcase.RegularXdsKubernetesTestCase):
@classmethod
@override
def setUpClass(cls):
# TODO(sergiitk): use when absl updated to 1.3.0+, also set
# flags.set_default(xds_flags.COMPUTE_API_VERSION, 'v1alpha')
super().setUpClass()
cls.compute_api_version = "v1alpha"

@staticmethod
def is_supported(config: skips.TestConfig) -> bool:
# Subsetting is an experimental feature where most work is done on the
Expand Down

0 comments on commit 107a1a0

Please sign in to comment.