Skip to content

Commit ed4d161

Browse files
authored
Merge branch 'master' into test-pairing
2 parents de17b0a + 9b223e2 commit ed4d161

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

test/e2e/parallel/user_workloads_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"time"
77

88
toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1"
9-
testconfig "github.com/codeready-toolchain/toolchain-common/pkg/test/config"
109
. "github.com/codeready-toolchain/toolchain-e2e/testsupport"
1110
"github.com/codeready-toolchain/toolchain-e2e/testsupport/wait"
1211
openshiftappsv1 "github.com/openshift/api/apps/v1"
@@ -26,8 +25,6 @@ func TestIdlerAndPriorityClass(t *testing.T) {
2625
await := WaitForDeployments(t)
2726
hostAwait := await.Host()
2827
memberAwait := await.Member1()
29-
// Provision a user to idle with a short idling timeout
30-
hostAwait.UpdateToolchainConfig(t, testconfig.AutomaticApproval().Enabled(false))
3128
NewSignupRequest(await).
3229
Username("test-idler").
3330
Email("test-idler@redhat.com").

test/e2e/parallel/vm_webhook_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"testing"
77

8-
testconfig "github.com/codeready-toolchain/toolchain-common/pkg/test/config"
98
"github.com/stretchr/testify/require"
109
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1110
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@@ -27,17 +26,13 @@ func TestCreateVirtualMachine(t *testing.T) {
2726

2827
// make sure everything is ready before running the actual tests
2928
awaitilities := WaitForDeployments(t)
30-
hostAwait := awaitilities.Host()
3129
memberAwait := awaitilities.Member1()
3230

3331
client, err := dynamic.NewForConfig(memberAwait.RestConfig)
3432
if err != nil {
3533
panic(err)
3634
}
3735

38-
// Provision a user to create the vm
39-
hostAwait.UpdateToolchainConfig(t, testconfig.AutomaticApproval().Enabled(false))
40-
4136
userCounter := 1
4237

4338
for tcname, tc := range map[string]struct {

testsupport/signup_request.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,9 @@ func (r *SignupRequest) Execute(t *testing.T) *SignupResult {
248248
userSignup, err := hostAwait.WaitForUserSignup(t, wait.EncodeUserIdentifier(userIdentity.Username))
249249
require.NoError(t, err, "failed to find UserSignup %s", userIdentity.Username)
250250

251-
if r.targetCluster != nil && hostAwait.GetToolchainConfig(t).Spec.Host.AutomaticApproval.Enabled != nil {
252-
require.False(t, *hostAwait.GetToolchainConfig(t).Spec.Host.AutomaticApproval.Enabled,
251+
autoApproval := hostAwait.GetToolchainConfig(t).Spec.Host.AutomaticApproval
252+
if r.targetCluster != nil && autoApproval.Enabled != nil {
253+
require.False(t, *autoApproval.Enabled,
253254
"cannot specify a target cluster for new signup requests while automatic approval is enabled")
254255
}
255256

0 commit comments

Comments
 (0)