-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (81 loc) · 4.39 KB
/
Copy pathMakefile
File metadata and controls
91 lines (81 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# Configuration of extension
EXT_NAME=quack_oauth
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
# Include the Makefile from extension-ci-tools
include extension-ci-tools/makefiles/duckdb_extension.Makefile
# ---------------------------------------------------------------------------
# Catch2 unit tests (pure-logic, no DuckDB linkage). The binary is built as
# part of the main release build; this target just runs it.
# ---------------------------------------------------------------------------
.PHONY: unit_test
unit_test: release
@if [ ! -x build/release/test/quack_oauth_unit_tests ]; then \
echo "build/release/test/quack_oauth_unit_tests not found -- check Catch2 in vcpkg.json"; \
exit 1; \
fi
./build/release/test/quack_oauth_unit_tests --reporter console::out=-
# ---------------------------------------------------------------------------
# Static-linkage smoke test. Assert the loadable extension only links against
# the platform's standard libraries. See docs/IMPLEMENTATION.md section 6.
# ---------------------------------------------------------------------------
.PHONY: smoke_static
smoke_static: release
@./scripts/check_static_linkage.sh \
build/release/extension/quack_oauth/quack_oauth.duckdb_extension
# ---------------------------------------------------------------------------
# README verifier: extract every ```sql block from README.md, run each
# through DuckDB with quack_oauth loaded, fail on parse errors or
# unknown functions / settings / SECRET fields. Catches "the docs got
# out of sync with the code" before it ships.
# ---------------------------------------------------------------------------
.PHONY: verify_readme
verify_readme: release
@python3 scripts/verify_readme.py
# ---------------------------------------------------------------------------
# Keycloak integration test (S-7b.3). Brings up a docker-compose Keycloak,
# acquires a real ROPC token, materialises a SQL test from a template, runs
# it through the DuckDB unittest binary, and tears the container down.
# Requires `docker compose` and port 8080 on localhost.
# ---------------------------------------------------------------------------
.PHONY: integration_keycloak
integration_keycloak: release
@./scripts/run_integration_keycloak.sh
# ---------------------------------------------------------------------------
# Google tokeninfo integration test (S-11b/Google + tokeninfo dispatch).
# Mints a fresh service-account access token from .env.google and validates
# it via Google's tokeninfo endpoint. Requires network access; no container.
# ---------------------------------------------------------------------------
.PHONY: integration_google
integration_google: release
@./scripts/run_integration_google.sh
# ---------------------------------------------------------------------------
# Quickstart demo. Brings up the same Keycloak compose used by the
# integration tests, configures a server SECRET + a SQL policy table,
# walks through token validation + an allowed query + a denied query
# + the audit log + diagnose(), then tears the container down.
# Intended for human readers: prints commentary as it goes.
# ---------------------------------------------------------------------------
.PHONY: demo
demo: release
@./scripts/demo.sh
# ---------------------------------------------------------------------------
# End-to-end harness: a real `quack` server with our extension's callbacks
# swapped in, driven by a Python DuckDB client via the quack wire protocol.
# Requires `uv` (https://github.com/astral-sh/uv) + `INSTALL quack` having
# been run once via the duckdb CLI. The harness lives at e2e/ so DuckDB's
# unittest scanner (which globs `test/`) does not stumble over the venv.
# ---------------------------------------------------------------------------
.PHONY: e2e
e2e: release
@cd e2e && uv sync --frozen && uv run pytest
# ---------------------------------------------------------------------------
# CI-config tests (no build needed). Assert the distribution pipeline
# excludes the wasm archs (issue #3) and that the bundled-fmt _SECURE_SCL
# patch transforms the header (the MSVC 19.51 / fmt 6.1.2 fix). Pure-logic
# checks of the build/CI plumbing; the real MSVC compile is validated in CI.
# ---------------------------------------------------------------------------
.PHONY: ci_config_test
ci_config_test:
@./scripts/test_ci_wasm_excluded.sh
@./scripts/test_fmt_patch.sh