Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,16 @@ jobs:
docker ps
exit 1

- name: Provision DataHub credentials
# datahub init mints a JWT and writes ~/.datahubenv; we also export the
# token as DATAHUB_GMS_TOKEN so the env-var path in tests works too.
- name: Write DataHub credentials file
# The local quickstart runs with METADATA_SERVICE_AUTH_ENABLED=false —
# no token is needed or available. Write ~/.datahubenv directly so that
# DataHubClient.from_env() and the test skip-guards detect the instance.
run: |
uv run datahub init \
--username datahub \
--password datahub \
--force \
--host http://localhost:8080

TOKEN=$(uv run python3 - <<'EOF'
import yaml, pathlib
cfg = yaml.safe_load(pathlib.Path("~/.datahubenv").expanduser().read_text()) or {}
print((cfg.get("gms") or {}).get("token", ""))
cat > ~/.datahubenv <<'EOF'
gms:
server: "http://localhost:8080"
token: ""
EOF
)
echo "DATAHUB_GMS_TOKEN=$TOKEN" >> "$GITHUB_ENV"

- name: Run integration tests
run: uv run pytest tests/integration/ -v --tb=short
Expand Down
17 changes: 5 additions & 12 deletions tests/integration/test_datahub_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,11 @@ def tools(datahub_client):


def test_tools_load(tools):
expected = {
"search",
"search_documents",
"get_entities",
"list_schema_fields",
"get_lineage",
"get_lineage_paths_between",
"get_dataset_queries",
"grep_documents",
"get_me",
}
assert expected == set(tools.keys()), f"Unexpected tool set: {set(tools.keys())}"
assert set(tools.keys()), "No tools loaded"
# Spot-check the stable core tools rather than asserting exact equality —
# new tools are added in datahub-agent-context without breaking the agent.
required = {"search", "get_entities", "list_schema_fields", "get_me"}
assert required <= set(tools.keys()), f"Missing required tools: {required - set(tools.keys())}"


# ── get_me ──────────────────────────────────────────────────────────────────
Expand Down
Loading