github.com/verrazzano/verrazzano@v1.7.1/tests/e2e/ha/monitor/web_ha_test.go (about)

     1  // Copyright (c) 2022, Oracle and/or its affiliates.
     2  // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  package monitor
     5  
     6  import (
     7  	. "github.com/onsi/ginkgo/v2"
     8  	. "github.com/onsi/gomega"
     9  	"github.com/verrazzano/verrazzano/pkg/k8sutil"
    10  	"github.com/verrazzano/verrazzano/tests/e2e/pkg"
    11  	hacommon "github.com/verrazzano/verrazzano/tests/e2e/pkg/ha"
    12  	dump "github.com/verrazzano/verrazzano/tests/e2e/pkg/test/clusterdump"
    13  )
    14  
    15  var (
    16  	clusterDump = dump.NewClusterDumpWrapper(t)
    17  	clientset   = k8sutil.GetKubernetesClientsetOrDie()
    18  )
    19  
    20  var _ = clusterDump.AfterEach(func() {}) // Dump cluster if spec fails
    21  
    22  var _ = t.Describe("Web Access", Label("f:platform-lcm:ha"), func() {
    23  	t.Context("Prometheus", func() {
    24  		hacommon.RunningUntilShutdownIt(t, "can access Prometheus endpoint", clientset, runContinuous, func() {
    25  			Expect(pkg.VerifyPrometheusComponent(t.Logs, nil, web.httpClient, web.users.verrazzano)).To(BeTrue())
    26  		})
    27  	})
    28  
    29  	t.Context("OpenSearch", func() {
    30  		hacommon.RunningUntilShutdownIt(t, "can access OpenSearch endpoint", clientset, runContinuous, func() {
    31  			Expect(pkg.VerifyOpenSearchComponent(t.Logs, nil, web.httpClient, web.users.verrazzano)).To(BeTrue())
    32  		})
    33  	})
    34  
    35  	t.Context("OpenSearch Dashboards", func() {
    36  		hacommon.RunningUntilShutdownIt(t, "can access OpenSearch Dashboards endpoint", clientset, runContinuous, func() {
    37  			Expect(pkg.VerifyOpenSearchDashboardsComponent(t.Logs, nil, web.httpClient, web.users.verrazzano)).To(BeTrue())
    38  		})
    39  	})
    40  
    41  	t.Context("Rancher", func() {
    42  		hacommon.RunningUntilShutdownIt(t, "can get a Rancher admin token", clientset, runContinuous, func() {
    43  			Expect(pkg.GetRancherAdminToken(t.Logs, web.httpClient, web.hosts.rancher)).ShouldNot(BeEmpty())
    44  		})
    45  	})
    46  
    47  	t.Context("Kiali", func() {
    48  		hacommon.RunningUntilShutdownIt(t, "can access Kiali endpoint", clientset, runContinuous, func() {
    49  			Expect(pkg.AssertBearerAuthorized(web.httpClient, web.hosts.kiali)).To(BeTrue())
    50  		})
    51  	})
    52  })