-
Notifications
You must be signed in to change notification settings - Fork 8
feat: introduce e2e cypher validation integration test suite #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zinic
wants to merge
4
commits into
SpecterOps:main
Choose a base branch
from
zinic:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b0ed68c
feat: introduce full cypher to result validation integration test sui…
zinic d2e0065
fix: omit empty node joins from recursive expansion
zinic 89f2530
feat(cysql): switch to flat ID carry-throughs to ensure index compati…
zinic 300d719
chore: fixup selectivity measurement; update makefile
zinic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,97 @@ | ||
| THIS_FILE := $(lastword $(MAKEFILE_LIST)) | ||
|
|
||
| GO_CMD?=go | ||
| CGO_ENABLED?=0 | ||
| # Go configuration | ||
| GO_CMD ?= go | ||
| CGO_ENABLED ?= 0 | ||
|
|
||
| MAIN_PACKAGES=$$($(GO_CMD) list ./...) | ||
| # Main packages to test/build | ||
| MAIN_PACKAGES := $(shell $(GO_CMD) list ./...) | ||
|
|
||
| default: format test | ||
| all: generate format test | ||
| # Default target | ||
| default: help | ||
| all: generate format tidy test | ||
|
|
||
| generate: | ||
| @$(GO_CMD) generate ./... | ||
| # Build targets | ||
| build: | ||
| @echo "Building all packages..." | ||
| @$(GO_CMD) build ./... | ||
|
|
||
| # Dependency management | ||
| deps: | ||
| @echo "Downloading dependencies..." | ||
| @$(GO_CMD) mod download | ||
|
|
||
| tidy: | ||
| @echo "Tidying go modules..." | ||
| @$(GO_CMD) mod tidy | ||
|
|
||
| # Code quality | ||
| lint: | ||
| @echo "Running linter..." | ||
| @$(GO_CMD) vet ./... | ||
|
|
||
| format: | ||
| @echo "Formatting code..." | ||
| @find ./ -name '*.go' -print0 | xargs -P 12 -0 -I '{}' goimports -w '{}' | ||
|
|
||
| # Test targets | ||
| test: | ||
| @for pkg in $(MAIN_PACKAGES) ; do \ | ||
| $(GO_CMD) test -cover $$pkg -parallel=20 ; \ | ||
| done | ||
| @echo "Running tests..." | ||
| @$(GO_CMD) test -race -cover -count=1 -parallel=10 $(MAIN_PACKAGES) | ||
|
|
||
| test_neo4j: | ||
| @echo "Running Neo4j integration tests..." | ||
| @$(GO_CMD) test -tags neo4j_integration -race -cover -count=1 -parallel=1 $(MAIN_PACKAGES) | ||
|
|
||
| test_pg: | ||
| @echo "Running PostgreSQL integration tests..." | ||
| @$(GO_CMD) test -tags pg_integration -race -cover -count=1 -parallel=1 $(MAIN_PACKAGES) | ||
|
|
||
| test_update: | ||
| @echo "Updating test cases..." | ||
| @CYSQL_UPDATE_CASES=true $(GO_CMD) test -parallel=10 $(MAIN_PACKAGES) >>/dev/null 2>&1|| true | ||
|
|
||
| @cp -fv cypher/analyzer/updated_cases/* cypher/test/cases | ||
| @rm -rf cypher/analyzer/updated_cases/ | ||
| @cp -fv cypher/models/pgsql/test/updated_cases/* cypher/models/pgsql/test/translation_cases | ||
| @rm -rf cypher/models/pgsql/test/updated_cases | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Utility targets | ||
| generate: | ||
| @echo "Running code generation..." | ||
| @$(GO_CMD) generate ./... | ||
|
|
||
| clean: | ||
| @echo "Cleaning build artifacts..." | ||
| @$(GO_CMD) clean ./... | ||
|
|
||
| @rm -rf cypher/analyzer/updated_cases/ | ||
| @rm -rf cypher/models/pgsql/test/updated_cases | ||
|
|
||
| help: | ||
| @echo "Available targets:" | ||
| @echo " default - Show this help message" | ||
| @echo " all - Runs all prep steps for prepare a changeset for review" | ||
| @echo "" | ||
| @echo "Build:" | ||
| @echo " build - Build all packages" | ||
| @echo "" | ||
| @echo "Dependencies:" | ||
| @echo " deps - Download dependencies" | ||
| @echo " tidy - Tidy go modules" | ||
| @echo "" | ||
| @echo "Code Quality:" | ||
| @echo " lint - Run go vet" | ||
| @echo " format - Format all Go files" | ||
| @echo " generate - Run code generation" | ||
| @echo "" | ||
| @echo "Testing:" | ||
| @echo " test - Run all unit tests with coverage" | ||
| @echo " test_bench - Run benchmark test" | ||
| @echo " test_neo4j - Run Neo4j integration tests" | ||
| @echo " test_pg - Run PostgreSQL integration tests" | ||
| @echo " test_update - Update test cases" | ||
| @echo "" | ||
| @echo "Utility:" | ||
| @echo " clean - Clean build artifacts" | ||
| @echo " help - Show this help message" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.