Ejemplo n.º 1
0
    def __init__(self, bindings, agent=None):
        """Constructor.

    Args:
      bindings: [dict] The data bindings to use to configure the scenario.
      agent: [GateAgent] The agent for invoking the test operations on Gate.
    """
        super(KubeV2GcsTestScenario, self).__init__(bindings, agent)
        bindings = self.bindings

        # We'll call out the app name because it is widely used
        # because it scopes the context of our activities.
        # pylint: disable=invalid-name
        self.TEST_APP = bindings['TEST_APP']

        # Take just the first if there are multiple
        # because some uses below assume just one.
        self.TEST_NAMESPACE = bindings['TEST_NAMESPACE'].split(',')[0]

        self.ARTIFACT_ACCOUNT = bindings['TEST_GCS_ARTIFACT_ACCOUNT']
        self.BUCKET = bindings['TEST_GCS_BUCKET']

        self.mf = sk.KubernetesManifestFactory(self)
        self.mp = sk.KubernetesManifestPredicateFactory()
        self.gcs = sk.GcsFileUploadAgent(bindings['TEST_GCS_CREDENTIALS_PATH'])
Ejemplo n.º 2
0
    def __init__(self, bindings, agent=None):
        """Constructor.

        Args:
          bindings: [dict] The data bindings to use to configure the scenario.
          agent: [GateAgent] The agent for invoking the test operations on Gate.
        """
        super(KubeV2CacheTestScenario, self).__init__(bindings, agent)
        bindings = self.bindings

        # We'll call out the app name because it is widely used
        # because it scopes the context of our activities.
        # pylint: disable=invalid-name
        self.TEST_APP = bindings["TEST_APP"]

        # Take just the first if there are multiple
        # because some uses below assume just one.
        self.TEST_NAMESPACE = bindings["TEST_NAMESPACE"].split(",")[0]

        self.mf = sk.KubernetesManifestFactory(self)
        self.mp = sk.KubernetesManifestPredicateFactory()