public class KubernetesAssert extends org.assertj.core.api.AbstractAssert<KubernetesAssert,io.fabric8.kubernetes.client.KubernetesClient>
Constructor and Description |
---|
KubernetesAssert(io.fabric8.kubernetes.client.KubernetesClient client) |
Modifier and Type | Method and Description |
---|---|
protected HasPodSelectionAssert |
createPodSelectionAssert(io.fabric8.kubernetes.api.model.HasMetadata resource) |
HasPodSelectionAssert |
deployment(String deploymentName)
Asserts that there is a deployment of the given name
|
HasPodSelectionAssert |
deployments()
Finds all the resources that create pod selections (Deployment, DeploymentConfig, ReplicaSet, ReplicationController)
and create a
HasPodSelectionAssert to make assertions on their pods that they startup etc. |
protected io.fabric8.kubernetes.api.model.Pod |
getPod(String podId,
String namespace) |
protected List<io.fabric8.kubernetes.api.model.Pod> |
getPods(String namespace) |
protected io.fabric8.kubernetes.api.model.ReplicationController |
getReplicationController(String replicationControllerId,
String namespace) |
protected io.fabric8.kubernetes.api.model.Service |
getService(String serviceId,
String namespace) |
protected io.fabric8.kubernetes.api.model.ServiceSpec |
getServiceSpec(String serviceId,
String namespace) |
void |
hasServicePort(String serviceId,
int port)
Asserts that the service can be found for the given name and has a port of the given value
|
String |
namespace() |
KubernetesNamespaceAssert |
namespace(String namespace)
Creates an asserter using the given namespace
|
PodAssert |
pod(String podName)
Asserts that the pod can be found for the given name
|
PodsAssert |
podList() |
PodsAssert |
podList(List<io.fabric8.kubernetes.api.model.Pod> pods) |
PodsAssert |
podList(io.fabric8.kubernetes.api.model.PodList pods) |
PodsAssert |
pods() |
PodsAssert |
podsForReplicationController(io.fabric8.kubernetes.api.model.ReplicationController replicationController)
Asserts that we can find the given replication controller and match it to a list of pods, returning the pods for further assertions
|
PodsAssert |
podsForReplicationController(String replicationControllerName)
Asserts that we can find the given replication controller and match it to a list of pods, returning the pods for further assertions
|
PodsAssert |
podsForService(io.fabric8.kubernetes.api.model.Service service)
Asserts that we can find the given service and match it to a list of pods, returning the pods for further assertions
|
PodsAssert |
podsForService(String serviceName)
Asserts that we can find the given service and match it to a list of pods, returning the pods for further assertions
|
HasPodSelectionAssert |
replicas(String replicaName)
Asserts that there is a ReplicaSet or ReplicationController of the given name
|
ReplicationControllerAssert |
replicationController(String replicationControllerName)
Asserts that the replication controller can be found for the given name
|
ReplicationControllerListAssert |
replicationControllerList() |
org.assertj.core.api.ListAssert<io.fabric8.kubernetes.api.model.ReplicationController> |
replicationControllers() |
ServicePodsAssert |
service(String serviceName)
Asserts that the given service name exist
|
ServiceListAssert |
serviceList() |
ServicesAssert |
services() |
ServiceSpecAssert |
serviceSpec(String serviceName)
Asserts that the service spec can be found for the given name
|
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage, usingComparator, usingDefaultComparator, withFailMessage, withThreadDumpOnError
public KubernetesAssert(io.fabric8.kubernetes.client.KubernetesClient client)
public KubernetesNamespaceAssert namespace(String namespace)
namespace
- public HasPodSelectionAssert deployments()
HasPodSelectionAssert
to make assertions on their pods that they startup etc.protected HasPodSelectionAssert createPodSelectionAssert(io.fabric8.kubernetes.api.model.HasMetadata resource)
public HasPodSelectionAssert deployment(String deploymentName)
public String namespace()
public HasPodSelectionAssert replicas(String replicaName)
public PodsAssert podList()
public PodsAssert podList(io.fabric8.kubernetes.api.model.PodList pods)
public PodsAssert podList(List<io.fabric8.kubernetes.api.model.Pod> pods)
public PodsAssert pods()
public ReplicationControllerListAssert replicationControllerList()
public org.assertj.core.api.ListAssert<io.fabric8.kubernetes.api.model.ReplicationController> replicationControllers()
public ServiceListAssert serviceList()
public ServicesAssert services()
public ServicePodsAssert service(String serviceName)
public PodsAssert podsForReplicationController(String replicationControllerName)
public PodsAssert podsForReplicationController(io.fabric8.kubernetes.api.model.ReplicationController replicationController)
public PodsAssert podsForService(String serviceName)
public PodsAssert podsForService(io.fabric8.kubernetes.api.model.Service service)
public ReplicationControllerAssert replicationController(String replicationControllerName)
protected io.fabric8.kubernetes.api.model.ReplicationController getReplicationController(String replicationControllerId, String namespace)
public void hasServicePort(String serviceId, int port)
public ServiceSpecAssert serviceSpec(String serviceName)
protected io.fabric8.kubernetes.api.model.Service getService(String serviceId, String namespace)
protected io.fabric8.kubernetes.api.model.ServiceSpec getServiceSpec(String serviceId, String namespace)
Copyright © 2011–2017 Red Hat. All rights reserved.