Skip to content

Commit 553b2c6

Browse files
authored
test: skip invalid password test for console ccm (#3416)
1 parent bb36097 commit 553b2c6

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

cypress/e2e/integration/rpc/activation.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,24 @@ export interface DeactivateCommandOptions {
176176
rpcDockerImage: string
177177
password: string
178178
amtVersion: string
179+
// console-only
180+
isAdminControlModeProfile?: boolean
179181
// cloud-only
180182
fqdn?: string
181183
}
182184

183185
export const buildDeactivateCommand = (opts: DeactivateCommandOptions): string => {
184186
const cmd = `deactivate`
185-
const common_flag = `-v -f --json --password ${opts.password}`
187+
const common_flag = `-v -f --json`
186188
if (isCloud) {
187189
const flagPart = parseInt(opts.amtVersion) <= 18 ? ' -tls-tunnel' : ''
188-
const args = `${cmd} -u wss://${opts.fqdn}/activate -n${flagPart} ${common_flag}`
190+
const args = `${cmd} -u wss://${opts.fqdn}/activate -n${flagPart} --password ${opts.password} ${common_flag}`
189191
return buildRpcCommand({ isWin: opts.isWin, rpcDockerImage: opts.rpcDockerImage }, 'rpc.exe', args)
190192
}
191193

192194
const flagPart = parseInt(opts.amtVersion) <= 18 ? '' : ' --skip-amt-cert-check'
193-
const args = `${cmd} --local${flagPart} ${common_flag}`
195+
const passPart = opts.isAdminControlModeProfile ? ` --password ${opts.password}` : ''
196+
const args = `${cmd} --local${flagPart}${passPart} ${common_flag}`
194197
return buildRpcCommand({ isWin: opts.isWin, rpcDockerImage: opts.rpcDockerImage }, 'rpc.exe', args)
195198
}
196199

cypress/e2e/integration/rpc/console.activation.spec.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ if (Cypress.env('ISOLATE').charAt(0).toLowerCase() !== 'y') {
5858
isWin,
5959
rpcDockerImage,
6060
password,
61-
amtVersion
61+
amtVersion,
62+
isAdminControlModeProfile
6263
})
6364
})
6465
})
@@ -153,7 +154,11 @@ if (Cypress.env('ISOLATE').charAt(0).toLowerCase() !== 'y') {
153154
})
154155
})
155156

156-
it('should NOT deactivate device - invalid password', () => {
157+
it('should NOT deactivate device - invalid password', function () {
158+
if (!isAdminControlModeProfile) {
159+
this.skip()
160+
}
161+
157162
if (!notActivatedControlModes.includes(amtInfo.controlMode)) {
158163
const invalidCommand =
159164
deactivateCommand.slice(0, deactivateCommand.indexOf('--password')) + '--password invalidpassword'

0 commit comments

Comments
 (0)