# Path: libcloudforensics/providers/gcp/internal/gke.py
# class GoogleKubernetesEngine:
# class GkeCluster(cluster.K8sCluster, GoogleKubernetesEngine):
#   GKE_API_VERSION = 'v1'
#   def GkeApi(self) -> 'googleapiclient.discovery.Resource':
#   def __init__(self, project_id: str, zone: str, cluster_id: str) -> None:
#   def name(self) -> str:
#   def _GetK8sApiClient(self) -> client.ApiClient:
#   def GetOperation(self) -> Dict[str, Any]:
#   def _MakeQuery(self, query_type: str) -> str:
#   def ClusterLogsQuery(
#       self, workload: Optional[base.K8sWorkload] = None) -> str:
#   def ContainerLogsQuery(
#       self, workload: Optional[base.K8sWorkload] = None) -> str:
#   def _GetValue(self, *keys: str, default: Any = None) -> Any:
#   def IsWorkloadIdentityEnabled(self) -> bool:
#   def IsLegacyEndpointsDisabled(self) -> bool:
#   def IsNetworkPolicyEnabled(self) -> bool:


import typing
import unittest
import mock
import libcloudforensics.providers.kubernetes.cluster as k8s
from libcloudforensics.providers.gcp.internal import gke
# -*- coding: utf-8 -*-
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the gcp module - gke.py"""




class GoogleKubernetesEngineTest(unittest.TestCase):
  """Test Google Kubernetes Engine class."""


  @typing.no_type_check
  # The next two decorators enable GkeCluster to be instantiated
  @mock.patch.object(k8s.K8sCluster, '_AuthorizationCheck', mock.Mock)
  @mock.patch.object(gke.GkeCluster, '_GetK8sApiClient', mock.Mock)

# Path: libcloudforensics/providers/gcp/internal/gke.py
# class GoogleKubernetesEngine:
# class GkeCluster(cluster.K8sCluster, GoogleKubernetesEngine):
#   GKE_API_VERSION = 'v1'
#   def GkeApi(self) -> 'googleapiclient.discovery.Resource':
#   def __init__(self, project_id: str, zone: str, cluster_id: str) -> None:
#   def name(self) -> str:
#   def _GetK8sApiClient(self) -> client.ApiClient:
#   def GetOperation(self) -> Dict[str, Any]:
#   def _MakeQuery(self, query_type: str) -> str:
#   def ClusterLogsQuery(
#       self, workload: Optional[base.K8sWorkload] = None) -> str:
#   def ContainerLogsQuery(
#       self, workload: Optional[base.K8sWorkload] = None) -> str:
#   def _GetValue(self, *keys: str, default: Any = None) -> Any:
#   def IsWorkloadIdentityEnabled(self) -> bool:
#   def IsLegacyEndpointsDisabled(self) -> bool:
#   def IsNetworkPolicyEnabled(self) -> bool:


# Path: tests/providers/gcp/internal/test_gke.py
import typing
import unittest
import mock
import libcloudforensics.providers.kubernetes.cluster as k8s
from libcloudforensics.providers.gcp.internal import gke

# -*- coding: utf-8 -*-
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the gcp module - gke.py"""




class GoogleKubernetesEngineTest(unittest.TestCase):
  """Test Google Kubernetes Engine class."""


  @typing.no_type_check
  # The next two decorators enable GkeCluster to be instantiated
  @mock.patch.object(k8s.K8sCluster, '_AuthorizationCheck', mock.Mock)
  @mock.patch.object(gke.GkeCluster, '_GetK8sApiClient', mock.Mock)

  @mock.patch.object(gke.GoogleKubernetesEngine, 'GkeApi')