initial public release
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# Smoke test for Phase 2 scan:
|
||||
# - go build + go vet
|
||||
# - go test on internal/scan
|
||||
# - hits the live Greenhouse Dragos API once to confirm end-to-end parse
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "-> go build ./..."
|
||||
go build ./...
|
||||
|
||||
echo "-> go vet ./..."
|
||||
go vet ./...
|
||||
|
||||
echo "-> go test ./internal/scan/..."
|
||||
go test ./internal/scan/... -count=1
|
||||
|
||||
echo "-> live check: Dragos Greenhouse API (HTTP 200 + jobs[] present)"
|
||||
python3 - <<'PY'
|
||||
import json, urllib.request
|
||||
req = urllib.request.Request("https://boards-api.greenhouse.io/v1/boards/dragos/jobs",
|
||||
headers={"User-Agent": "apex-smoke/1.0"})
|
||||
with urllib.request.urlopen(req, timeout=10) as r:
|
||||
body = json.loads(r.read())
|
||||
jobs = body.get("jobs", [])
|
||||
assert isinstance(jobs, list) and len(jobs) > 0, "expected jobs[] populated"
|
||||
print(f" {len(jobs)} jobs returned — smoke ok")
|
||||
PY
|
||||
|
||||
echo "-> all checks passed"
|
||||
Reference in New Issue
Block a user