Skip to content

Commit

Permalink
fix: bypass geetest in login phone test
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Oct 21, 2024
1 parent f430f7d commit 8bb4876
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/consent/app/login/phone/server-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const getCaptchaChallenge = async (
const id = res.id
const challenge = res.challengeCode

if (env.NODE_ENV === "development") {
if (env.CI || env.NODE_ENV === "development") {
const params = new URLSearchParams({
login_challenge,
})
Expand Down
2 changes: 2 additions & 0 deletions apps/consent/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ export const env = createEnv({
shared: {
GRAPHQL_ENDPOINT: z.string().default("http://localhost:4455/graphql"),
NODE_ENV: z.string(),
CI: z.boolean().default(false),
},
runtimeEnv: {
CORE_AUTH_URL: process.env.CORE_AUTH_URL,
HYDRA_ADMIN_URL: process.env.HYDRA_ADMIN_URL,
GRAPHQL_ENDPOINT: process.env.GRAPHQL_ENDPOINT,
NODE_ENV: process.env.NODE_ENV,
CI: process.env.CI,
},
})
6 changes: 6 additions & 0 deletions dev/Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ local_resource(

local_resource(
name="setup-voucher",
labels = ["test"],
cmd="buck2 run //dev:setup-voucher-escrow",
allow_parallel=False,
auto_init=run_apps,
Expand All @@ -681,6 +682,9 @@ local_resource(
)

docker_groups = {
"apps": [
"voucher-pg",
],
"auth": [
"api-keys-pg",
"oathkeeper",
Expand Down Expand Up @@ -746,6 +750,8 @@ for service in docker_groups["bitcoin"]:
dc_resource(service, labels = ["bitcoin"])
for service in docker_groups["tracing"]:
dc_resource(service, labels = ["tracing"])
for service in docker_groups["apps"]:
dc_resource(service, labels = ["apps"])
for service in docker_groups["core"]:
dc_resource(service, labels = ["core"])
for service in docker_groups["auth"]:
Expand Down

0 comments on commit 8bb4876

Please sign in to comment.