diff --git a/tests/v2/validation/rbac/rbac_test.go b/tests/v2/validation/rbac/rbac_test.go index 6d7fde3b719..e43b6148184 100644 --- a/tests/v2/validation/rbac/rbac_test.go +++ b/tests/v2/validation/rbac/rbac_test.go @@ -6,6 +6,7 @@ import ( "strings" "testing" + "github.com/rancher/norman/types" "github.com/rancher/rancher/tests/v2/actions/projects" "github.com/rancher/rancher/tests/v2/actions/rbac" "github.com/rancher/shepherd/clients/rancher" @@ -47,12 +48,21 @@ func (rb *RBTestSuite) SetupSuite() { rb.cluster, err = rb.client.Management.Cluster.ByID(clusterID) require.NoError(rb.T(), err) + log.Info("Getting cluster names") + clusterList, err := client.Management.Cluster.List(&types.ListOpts{}) + require.NoError(rb.T(), err) + + for _, cluster := range clusterList.Data { + log.Infof("Cluster name %s", cluster.Name) + } } func (rb *RBTestSuite) sequentialTestRBAC(role rbac.Role, member string, user *management.User) { standardClient, err := rb.client.AsUser(user) require.NoError(rb.T(), err) + log.Infof("Cluster ID %s", rb.cluster.ID) + adminProject, err := rb.client.Management.Project.Create(projects.NewProjectConfig(rb.cluster.ID)) require.NoError(rb.T(), err) @@ -72,6 +82,8 @@ func (rb *RBTestSuite) sequentialTestRBAC(role rbac.Role, member string, user *m additionalUser, err := users.CreateUserWithRole(rb.client, users.UserConfig(), rbac.StandardUser.String()) require.NoError(rb.T(), err) + log.Infof("Cluster ID %s", rb.cluster.ID) + rb.Run("Validating Global Role Binding is created for "+role.String(), func() { rbac.VerifyGlobalRoleBindingsForUser(rb.T(), user, rb.client) }) diff --git a/tests/v2/validation/workloads/workload_test.go b/tests/v2/validation/workloads/workload_test.go index 98523698937..c0d73706903 100644 --- a/tests/v2/validation/workloads/workload_test.go +++ b/tests/v2/validation/workloads/workload_test.go @@ -1,10 +1,11 @@ -//go:build (validation || infra.any || cluster.any || sanity) && !stress +//go:build (validation || infra.any || cluster.any || sanity) && !stress && !extended package workloads import ( "testing" + "github.com/rancher/norman/types" projectsapi "github.com/rancher/rancher/tests/v2/actions/projects" "github.com/rancher/rancher/tests/v2/actions/workloads/cronjob" "github.com/rancher/rancher/tests/v2/actions/workloads/daemonset" @@ -54,12 +55,21 @@ func (w *WorkloadTestSuite) SetupSuite() { w.cluster, err = w.client.Management.Cluster.ByID(clusterID) require.NoError(w.T(), err) + + log.Info("Getting cluster names") + clusterList, err := client.Management.Cluster.List(&types.ListOpts{}) + require.NoError(w.T(), err) + + for _, cluster := range clusterList.Data { + log.Infof("Cluster name %s", cluster.Name) + } } func (w *WorkloadTestSuite) TestWorkloadDeployment() { subSession := w.session.NewSession() defer subSession.Cleanup() + log.Infof("Cluster ID %s", w.cluster.ID) _, namespace, err := projectsapi.CreateProjectAndNamespace(w.client, w.cluster.ID) require.NoError(w.T(), err) @@ -71,6 +81,7 @@ func (w *WorkloadTestSuite) TestWorkloadSideKick() { subSession := w.session.NewSession() defer subSession.Cleanup() + log.Infof("Cluster ID %s", w.cluster.ID) _, namespace, err := projectsapi.CreateProjectAndNamespace(w.client, w.cluster.ID) require.NoError(w.T(), err) @@ -109,6 +120,7 @@ func (w *WorkloadTestSuite) TestWorkloadDaemonSet() { subSession := w.session.NewSession() defer subSession.Cleanup() + log.Infof("Cluster ID %s", w.cluster.ID) _, namespace, err := projectsapi.CreateProjectAndNamespace(w.client, w.cluster.ID) require.NoError(w.T(), err) @@ -125,6 +137,7 @@ func (w *WorkloadTestSuite) TestWorkloadCronjob() { subSession := w.session.NewSession() defer subSession.Cleanup() + log.Infof("Cluster ID %s", w.cluster.ID) _, namespace, err := projectsapi.CreateProjectAndNamespace(w.client, w.cluster.ID) require.NoError(w.T(), err) @@ -160,6 +173,7 @@ func (w *WorkloadTestSuite) TestWorkloadStatefulset() { subSession := w.session.NewSession() defer subSession.Cleanup() + log.Infof("Cluster ID %s", w.cluster.ID) _, namespace, err := projectsapi.CreateProjectAndNamespace(w.client, w.cluster.ID) require.NoError(w.T(), err) @@ -197,6 +211,7 @@ func (w *WorkloadTestSuite) TestWorkloadUpgrade() { subSession := w.session.NewSession() defer subSession.Cleanup() + log.Infof("Cluster ID %s", w.cluster.ID) _, namespace, err := projectsapi.CreateProjectAndNamespace(w.client, w.cluster.ID) require.NoError(w.T(), err)