@@ -25,6 +25,7 @@ import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
25
25
import { TIMEOUT_CONSTANTS } from '../../constants/TIMEOUT_CONSTANTS' ;
26
26
import { DriverHelper } from '../../utils/DriverHelper' ;
27
27
import { error } from 'selenium-webdriver' ;
28
+ import { CreateWorkspace } from '../../pageobjects/dashboard/CreateWorkspace' ;
28
29
29
30
suite (
30
31
`Create a workspace via launching a factory from the ${ FACTORY_TEST_CONSTANTS . TS_SELENIUM_FACTORY_GIT_REPO_URL } repository` ,
42
43
const appVersion : string = BASE_TEST_CONSTANTS . TESTING_APPLICATION_VERSION
43
44
? BASE_TEST_CONSTANTS . TESTING_APPLICATION_VERSION . split ( '.' ) . slice ( 0 , 2 ) . join ( '.' )
44
45
: 'next' ;
46
+ const createWorkspace : CreateWorkspace = e2eContainer . get ( CLASSES . CreateWorkspace ) ;
45
47
let currentNamespace : string | undefined = '' ;
46
48
let cheClusterNamespace : string | undefined = '' ;
47
49
let cheClusterName : string | undefined = '' ;
56
58
await browserTabsUtil . navigateTo (
57
59
FACTORY_TEST_CONSTANTS . TS_SELENIUM_FACTORY_URL ( ) || 'https://github.com/redhat-developer/devspaces/'
58
60
) ;
61
+ await createWorkspace . performTrustAuthorPopup ( ) ;
59
62
} ) ;
60
63
61
64
test ( 'Obtain workspace name from workspace loader page' , async function ( ) : Promise < void > {
@@ -112,7 +115,7 @@ suite(
112
115
const commandToBuildCustomVSXImage : string = `cd ${ pathToPluginRegistry } && yes | ./build.sh` ;
113
116
const commandLoginIntoInternalRegistry : string =
114
117
'podman login -u $(oc whoami | tr -d :) -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000' ;
115
- const retagImageCommand : string = `podman tag quay.io/devspaces/pluginregistry-rhel8 :next ${ internalRegistry } /${ currentNamespace } /che-plugin-registry:${ appVersion } ` ;
118
+ const retagImageCommand : string = `podman tag quay.io/devspaces/pluginregistry-rhel9 :next ${ internalRegistry } /${ currentNamespace } /che-plugin-registry:${ appVersion } ` ;
116
119
117
120
const output : ShellString = kubernetesCommandLineToolsExecutor . execInContainerCommand ( commandToBuildCustomVSXImage ) ;
118
121
expect ( output . code ) . equals ( 0 ) ;
@@ -130,6 +133,8 @@ suite(
130
133
131
134
test ( 'Configure Che to use the embedded Eclipse Open VSX server' , function ( ) : void {
132
135
// create secret for using internal registry
136
+ kubernetesCommandLineToolsExecutor . execInContainerCommand ( `oc delete secret regcred -n ${ cheClusterNamespace } || true` ) ;
137
+
133
138
const createRegistrySecretCommand : string = `oc create secret -n ${ cheClusterNamespace } docker-registry regcred --docker-server=${ internalRegistry } --docker-username=\$(oc whoami | tr -d :) --docker-password=\$(oc whoami -t)` ;
134
139
const createSecretOutput : string = kubernetesCommandLineToolsExecutor . execInContainerCommand ( createRegistrySecretCommand ) ;
135
140
expect ( createSecretOutput ) . contains ( 'regcred created' ) ;
@@ -194,6 +199,7 @@ suite(
194
199
} ) ;
195
200
196
201
suiteTeardown ( 'Clean up resources and restore default CHE cluster CR' , async function ( ) : Promise < void > {
202
+ kubernetesCommandLineToolsExecutor . getPodAndContainerNames ( ) ;
197
203
try {
198
204
kubernetesCommandLineToolsExecutor . execInContainerCommand ( `oc delete secret regcred -n ${ cheClusterNamespace } ` ) ;
199
205
} catch ( error ) {
0 commit comments