Example #1
0
    def test_basic_s390x(self):
        """
        Sets up and tests dashboard, dns, storage, registry, ingress, metrics server.

        """
        ip_ranges = "8.8.8.8,1.1.1.1"
        print("Enabling DNS")
        microk8s_enable("{}:{}".format("dns", ip_ranges), timeout_insec=500)
        wait_for_pod_state("",
                           "kube-system",
                           "running",
                           label="k8s-app=kube-dns")
        print("Validating DNS config")
        validate_coredns_config(ip_ranges)
        print("Enabling metrics-server")
        microk8s_enable("metrics-server")
        print("Enabling dashboard")
        microk8s_enable("dashboard")
        print("Validating dashboard")
        validate_dns_dashboard()
        print("Validating Port Forward")
        validate_forward()
        print("Validating the Metrics Server")
        validate_metrics_server()
        print("Disabling metrics-server")
        microk8s_disable("metrics-server")
        print("Disabling dashboard")
        microk8s_disable("dashboard")
Example #2
0
 def test_dns_addon(self):
     ip_ranges = "8.8.8.8,1.1.1.1"
     print("Enabling DNS")
     microk8s_enable("{}:{}".format("dns", ip_ranges), timeout_insec=500)
     wait_for_pod_state("",
                        "kube-system",
                        "running",
                        label="k8s-app=kube-dns")
     print("Validating DNS config")
     validate_coredns_config(ip_ranges)
     print("Disabling DNS")
     microk8s_disable("dns")