Skip to content

Add stream POST negative tests#948

Open
Emelie-Dev wants to merge 31 commits into
LabsCrypt:mainfrom
Emelie-Dev:test/815-stream-post-negative-cases
Open

Add stream POST negative tests#948
Emelie-Dev wants to merge 31 commits into
LabsCrypt:mainfrom
Emelie-Dev:test/815-stream-post-negative-cases

Conversation

@Emelie-Dev

Copy link
Copy Markdown

closes #815

@Emelie-Dev Emelie-Dev force-pushed the test/815-stream-post-negative-cases branch from 4c19d29 to e148673 Compare June 30, 2026 23:49
@ogazboiz

ogazboiz commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

your branch is green, but it went conflicting after the ci fixes landed on main: #969 and #974 touched backend/Dockerfile and backend/src/workers/soroban-event-worker.ts, which this pr also edits. please rebase on main and it should be good to go: git fetch origin && git rebase origin/main && git push --force-with-lease. if any of your Dockerfile or soroban-event-worker changes overlap what #969 already did (copying prisma/ into the runner, and the import type { Prisma } from '../generated/prisma' fix), drop those now-redundant bits and keep just your actual change. i'll re-review and merge once it's rebased and ci is green.

@ogazboiz ogazboiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the negative tests themselves are good (400 on malformed/missing numeric fields, 403 on non-owner reactivation, asserting prisma.stream.upsert isn't called). but this branch is based on stale main and would regress it, so it needs a rebase before it can land:

  1. it reverts #969's fix, soroban-event-worker.ts changes import { prisma, Prisma } back to import { prisma } (dropping the Prisma import), whereas current main uses import type { Prisma } from '../generated/prisma'. merging this would re-break the typecheck fix #969 landed.
  2. stale ci.yml, it removes the "Upload frontend coverage to Codecov" step that main currently has.
  3. it rewrites .github/dependabot.yml (collapsing the per-dir entries into one root) and mass-reformats several backend files (single->double quote churn), all unrelated to negative tests and overlapping earlier dependabot work.

please rebase on current main and drop everything except the actual negative tests, then it's a clean add. as-is it would revert the ci fixes.

@ogazboiz ogazboiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good progress, and thanks for addressing the earlier regressions: the Prisma import is back to ../generated/prisma (correct), and the ci.yml and dependabot.yml changes are gone. the negative tests themselves are solid coverage. but it's still carrying unrelated changes under a "negative tests" title that need to come out before it can land:

  1. it rewrites backend/Dockerfile, changing the COPY prisma.config.ts ./ line (which the restored Backend Docker Image CI relies on) to COPY --from=builder /app/prisma.config.ts. even though ci is green, that's a modification to infra i recently fixed and it doesn't belong in a tests pr. please drop it.
  2. app.ts has pure reformatting churn (multi-line import rewrap, .map/.filter re-indent) unrelated to the tests. drop that too.

trim it down to the actual negative tests (plus only whatever minimal change is genuinely needed for them to run) and it's a clean, welcome add. right now +1383/-554 for "negative tests" is mostly churn, and the Dockerfile rewrite is the part i really don't want slipping in unnoticed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing] POST /v1/streams lacks negative tests for malformed body and caller authorization

2 participants