fix: address QA feedback on PR #2

- Fix test mock paths from "./db" to "../db" to match route imports
- Add "test" back to build job needs array (regression from previous PR)

This addresses QA feedback:
1. Test job missing DATABASE_URL - fixed by correcting mock paths so tests use mocked db instead of trying to connect to real DB
2. Build job dropped test from needs - restored to prevent building with broken tests
3. Docker push permission denied - requires CTO escalation for GHCR org config

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-11 04:29:01 +00:00
committed by Flea Flicker [agent]
parent 4af261e1cc
commit b361016406
11 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
needs: [lint-typecheck]
needs: [lint-typecheck, test]
steps:
- uses: actions/checkout@v4
+1 -1
View File
@@ -5,7 +5,7 @@ let dbSelectResult: unknown[] = [];
const mockEq = vi.fn((_col: unknown, _val: unknown) => ({ col: _col, val: _val }));
const mockDecryptSecret = vi.fn((s: string) => `decrypted:${s}`);
vi.mock("./db", () => {
vi.mock("../db", () => {
const authProviderConfig = new Proxy(
{ _name: "auth_provider_config" },
{
+1 -1
View File
@@ -40,7 +40,7 @@ function resetMock() {
deletedId = null;
}
vi.mock("./db", () => {
vi.mock("../db", () => {
function makeChainable(data: unknown[]): unknown {
const arr = [...data];
const chain = new Proxy(arr, {
+1 -1
View File
@@ -39,7 +39,7 @@ function resetMock() {
lastUpdate = {};
}
vi.mock("./db", () => {
vi.mock("../db", () => {
const appointments = new Proxy(
{ _name: "appointments" },
{ get: (t, p) => (p === "_name" ? "appointments" : { table: "appointments", column: p }) }
+1 -1
View File
@@ -76,7 +76,7 @@ function makeChainableResult(data: unknown[]): unknown {
});
}
vi.mock("./db", () => {
vi.mock("../db", () => {
function makeTable(name: string) {
return new Proxy(
{ _name: name },
+1 -1
View File
@@ -40,7 +40,7 @@ function resetDb() {
// ─── Module mocks ─────────────────────────────────────────────────────────────
vi.mock("./db", () => {
vi.mock("../db", () => {
const pets = new Proxy(
{ _name: "pets" },
{ get(t, p) { return p === "_name" ? "pets" : {}; } }
+1 -1
View File
@@ -47,7 +47,7 @@ function resetMock() {
updatedValues = [];
}
vi.mock("./db", () => {
vi.mock("../db", () => {
function makeChainable(data: unknown[]): unknown {
const arr = [...data];
const chain = new Proxy(arr, {
+1 -1
View File
@@ -46,7 +46,7 @@ const GROOMER: StaffRow = {
let staffLookupResult: StaffRow | null = null;
let managerFallbackResult: StaffRow | null = MANAGER;
vi.mock("./db", () => {
vi.mock("../db", () => {
const staff = new Proxy(
{ _name: "staff" },
{
+1 -1
View File
@@ -23,7 +23,7 @@ const PET_ROW = {
let clientResults: typeof ACTIVE_CLIENT[] = [];
let petResults: typeof PET_ROW[] = [];
vi.mock("./db", () => {
vi.mock("../db", () => {
// Proxy objects for table/column references — values don't matter for tests
const tableProxy = (name: string) =>
new Proxy(
+1 -1
View File
@@ -39,7 +39,7 @@ function clearAuthEnv() {
// ─── Mock db module ───────────────────────────────────────────────────────────
vi.mock("./db", () => {
vi.mock("../db", () => {
const authProviderConfig = new Proxy(
{ _name: "auth_provider_config" },
{
+1 -1
View File
@@ -49,7 +49,7 @@ function resetMock() {
updatedValues = [];
}
vi.mock("./db", () => {
vi.mock("../db", () => {
function makeChainable(data: unknown[]): unknown {
const arr = [...data];
const chain = new Proxy(arr, {