예제 #1
0
 def testVerifyKubernetesFlagsLocation(self):
   args = parser_extensions.Namespace(cluster_location=None)
   with self.assertRaises(exceptions.ConfigurationError):
     args.cluster_location = 'us-central1-a'
     flags.VerifyKubernetesFlags(args, self.track, flags.Product.RUN)
예제 #2
0
 def testVerifyKubernetesFlagsEgressSettings(self):
   args = parser_extensions.Namespace(vpc_egress='private-ranges-only')
   with self.assertRaises(exceptions.ConfigurationError):
     flags.VerifyKubernetesFlags(args, self.track, flags.Product.RUN)
예제 #3
0
 def testVerifyKubernetesFlagsCluster(self):
   args = parser_extensions.Namespace(cluster=None)
   with self.assertRaises(exceptions.ConfigurationError):
     args.cluster = 'cluster-1'
     flags.VerifyKubernetesFlags(args, self.track, flags.Product.RUN)
예제 #4
0
 def testVerifyKubernetesFlagsConnectivityAndIngress(self):
   args = parser_extensions.Namespace(connectivity=None, ingress=None)
   with self.assertRaises(exceptions.ConfigurationError):
     args.connectivity = 'internal'
     args.ingress = 'internal'
     flags.VerifyKubernetesFlags(args, self.track, flags.Product.RUN)
예제 #5
0
 def testVerifyKubernetesFlagsAllowUnauthenticated(self):
   args = parser_extensions.Namespace(allow_unauthenticated=None)
   with self.assertRaises(exceptions.ConfigurationError):
     args.allow_unauthenticated = True
     flags.VerifyKubernetesFlags(args, self.track, flags.Product.RUN)
예제 #6
0
 def testVerifyKubernetesFlagsRegion(self):
     args = parser_extensions.Namespace(region=None)
     with self.assertRaises(exceptions.ConfigurationError):
         args.region = 'us-central1'
         flags.VerifyKubernetesFlags(args, calliope_base.ReleaseTrack.GA,
                                     flags.Product.RUN)
예제 #7
0
 def testVerifyKubernetesFlagsServiceAccount(self):
     args = parser_extensions.Namespace(service_account=None)
     with self.assertRaises(exceptions.ConfigurationError):
         args.service_account = '*****@*****.**'
         flags.VerifyKubernetesFlags(args, calliope_base.ReleaseTrack.GA,
                                     flags.Product.RUN)