Skip to content

Commit eeca422

Browse files
author
Niraj Acharya
committed
test: add test for mfa
1 parent 74628db commit eeca422

File tree

15 files changed

+3640
-29
lines changed

15 files changed

+3640
-29
lines changed

.drone.star

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ config = {
221221
"earlyFail": True,
222222
"skip": False,
223223
"features": [
224-
"specs/admin-settings/spaces.spec.ts",
224+
"specs/keycloak/mfa.spec.ts",
225+
# "specs/admin-settings/spaces.spec.ts",
225226
],
226227
"extraServerEnvironment": {
227228
"PROXY_AUTOPROVISION_ACCOUNTS": "true",
@@ -236,6 +237,12 @@ config = {
236237
"GRAPH_ASSIGN_DEFAULT_USER_ROLE": "false",
237238
"GRAPH_USERNAME_MATCH": "none",
238239
"KEYCLOAK_DOMAIN": "keycloak:8443",
240+
"OCIS_MFA_ENABLED": "true",
241+
"WEB_OIDC_SCOPE": "openid profile email acr",
242+
},
243+
"testEnv": {
244+
"MFA": "true",
245+
"RETRY": "0",
239246
},
240247
},
241248
},
@@ -308,14 +315,13 @@ def beforePipelines(ctx):
308315
return checkStarlark() + \
309316
licenseCheck(ctx) + \
310317
documentation(ctx) + \
311-
changelog(ctx) + \
312318
pnpmCache(ctx) + \
313319
cacheOcisPipeline(ctx) + \
314320
pipelinesDependsOn(buildCacheWeb(ctx), pnpmCache(ctx)) + \
315321
pipelinesDependsOn(pnpmlint(ctx), pnpmCache(ctx))
316322

317323
def stagePipelines(ctx):
318-
unit_test_pipelines = unitTests(ctx)
324+
unit_test_pipelines = [] # unitTests(ctx)
319325

320326
# run only unit tests when publishing a standalone package
321327
if (determineReleasePackage(ctx) != None):
@@ -616,6 +622,7 @@ def e2eTestsOnPlaywright(ctx):
616622
"extraServerEnvironment": {},
617623
"skipA11y": True,
618624
"reportTracing": False,
625+
"testEnv": {},
619626
}
620627

621628
pipelines = []
@@ -696,6 +703,8 @@ def e2eTestsOnPlaywright(ctx):
696703
if "keycloak" in suite:
697704
environment["KEYCLOAK"] = "true"
698705
environment["KEYCLOAK_HOST"] = "keycloak:8443"
706+
if params["testEnv"]:
707+
environment.update(params["testEnv"])
699708
e2e_volumes.append({
700709
"name": "certs",
701710
"temp": {},
@@ -1968,7 +1977,7 @@ def keycloakService():
19681977
},
19691978
"commands": [
19701979
"mkdir -p /opt/keycloak/data/import",
1971-
"cp tests/drone/ocis_keycloak/ocis-ci-realm.dist.json /opt/keycloak/data/import/oCIS-realm.json",
1980+
"cp tests/drone/ocis_keycloak/ocis-mfa-ci-realm.dist.json /opt/keycloak/data/import/oCIS-realm.json",
19721981
"/opt/keycloak/bin/kc.sh start-dev --proxy-headers xforwarded --spi-connections-http-client-default-disable-trust-manager=true --import-realm --health-enabled=true",
19731982
],
19741983
"volumes": [

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767
"git-repo-info": "2.1.1",
6868
"globals": "^16.5.0",
6969
"happy-dom": "20.0.10",
70+
"jimp": "^1.6.0",
7071
"jsdom": "^27.2.0",
72+
"jsqr": "^1.4.0",
7173
"license-checker-rseidelsohn": "4.4.2",
7274
"multiple-cucumber-html-reporter": "^3.9.3",
7375
"node-fetch": "3.3.2",
@@ -79,6 +81,7 @@
7981
"rollup-plugin-gzip": "^4.1.1",
8082
"rollup-plugin-visualizer": "6.0.5",
8183
"simple-git": "3.32.3",
84+
"speakeasy": "^2.0.0",
8285
"ts-node": "10.9.2",
8386
"tslib": "2.8.1",
8487
"typescript": "5.9.3",

0 commit comments

Comments
 (0)