components/global/core/io.cellery.observability.k8s.client/src/test/java/io/cellery/observability/k8s/client/BaseTestCase.java
private Pod generatePod(String podName, Map<String, String> labels, PodStatus status) {
        labels.put(TEST_LABEL, "true");
        return new PodBuilder()
                .withNewMetadata()
                .withNamespace(Constants.NAMESPACE)
                .withCreationTimestamp(CREATION_TIMESTAMP_STRING)
                .withName(podName)
                .addToLabels(labels)
                .endMetadata()
                .withNewSpec()
                .withNodeName(NODE_NAME)
                .addNewContainer()
                .withName("test-container")
                .withNewImage("busybox")
                .withNewImagePullPolicy("IfNotPresent")
                .withCommand("tail", "-f", "/dev/null")
                .endContainer()
                .endSpec()
                .withStatus(status)
                .build();
    }
/**
     * Generate a pod using the provided labels and container with the provided pod name.
     * The returned pod can be used as one of the returned pods in K8s Mock Server in expectation mode.
     *
     * @param podName   The name of the new pod
     * @param labels    The set of labels to apply
     * @param status    The state
     * @return The generated pod
     */
Generate a pod using the provided labels and container with the provided pod name.
The returned pod can be used as one of the returned pods in K8s Mock Server in expectation mode.

@param podName   The name of the new pod
@param labels    The set of labels to apply
@param status    The state
@return The generated pod
Generate a pod using the provided labels and container with the provided pod name . The returned pod can be used as one of the returned pods in K8s Mock Server in expectation mode . @param podName The name of the new pod @param labels The set of labels to apply @param status The state @return The generated pod
private Pod generatePod(String podName, Map<String, String> labels, PodStatus status) {
        labels.put(TEST_LABEL, "true");
        return new PodBuilder()
                .withNewMetadata()
                .withNamespace(Constants.NAMESPACE)
                .withCreationTimestamp(CREATION_TIMESTAMP_STRING)
                .withName(podName)
                .addToLabels(labels)
                .endMetadata()
                .withNewSpec()
                .withNodeName(NODE_NAME)
                .addNewContainer()
                .withName("test-container")
                .withNewImage("busybox")
                .withNewImagePullPolicy("IfNotPresent")
                .withCommand("tail", "-f", "/dev/null")
                .endContainer()
                .endSpec()
                .withStatus(status)
                .build();
    }
private Pod generatePod ( String podName , Map < String , String > labels , PodStatus status ) { labels . put ( TEST_LABEL , "true" ) ; return new PodBuilder ( ) . withNewMetadata ( ) . withNamespace ( Constants . NAMESPACE ) . withCreationTimestamp ( CREATION_TIMESTAMP_STRING ) . withName ( podName ) . addToLabels ( labels ) . endMetadata ( ) . withNewSpec ( ) . withNodeName ( NODE_NAME ) . addNewContainer ( ) . withName ( "test-container" ) . withNewImage ( "busybox" ) . withNewImagePullPolicy ( "IfNotPresent" ) . withCommand ( "tail" , "-f" , "/dev/null" ) . endContainer ( ) . endSpec ( ) . withStatus ( status ) . build ( ) ; }
Generate a pod using the provided labels and container with the provided pod name.
Generate a pod using the provided labels and container with the provided pod name .