Skip to content

BED-5725 Additional Integration Tests for Remaining Fixture Files #1665

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

Merged
merged 25 commits into from
Jul 9, 2025

Conversation

kpowderly
Copy link
Contributor

@kpowderly kpowderly commented Jul 9, 2025

Description

Replacement of previous integration tests to test ingest. This PR covers the remaining fixture files to test ingest post-PR.

Motivation and Context

Builds upon steel thread for BED-5725

Additional integration tests were created to test ingestion.

Asserts the remaining json data files with graph fixture
Asserts the remaining zip files (containing the json data files) with graph fixture

Flow
a. Reuse payload files from IngestJob Test as input
b. Set up database with a consistent fake job that appropriately points to the input files
c. Validate graph matches some graph fixture

How Has This Been Tested?

Passing integration tests

Screenshots (optional):

Types of changes

  • Chore (a change that does not modify the application functionality)

Checklist:

Summary by CodeRabbit

  • New Features
    • Added comprehensive test data fixtures for multiple entity types and ingestion versions, including computers, users, groups, domains, containers, OUs, sessions, GPOs, certificate authorities, issuance policies, and NTAuth stores.
  • Tests
    • Introduced new integration tests for version 5 and version 6 ingestion using both JSON and ZIP file formats, expanding test coverage and verification scenarios.
    • Improved error messaging in graph assertion tests for better clarity on missing nodes.
    • Reformatted test fixture JSON for improved readability and correctness.
  • Bug Fixes
    • Enhanced database connection string parsing and resource cleanup in integration tests to prevent potential errors and improve reliability.

@kpowderly kpowderly self-assigned this Jul 9, 2025
Copy link
Contributor

coderabbitai bot commented Jul 9, 2025

Walkthrough

This update introduces a comprehensive set of new JSON fixture files for versions 5 and 6 of the graphify ingestion service, covering entities such as computers, users, groups, domains, GPOs, and certificate authorities. It also adds extensive integration tests for these ingestion scenarios, improves assertion error messaging in graph comparison utilities, and applies minor code and formatting corrections.

Changes

File(s) Change Summary
cmd/api/src/api/v2/apiclient/analysisrequest.go Added a trailing space to the import line for the model package; no logic changes.
.../fixtures/TestVersion5IngestJSON/ingest/*.json Added new JSON fixture files for version 5 ingestion: computers, containers, domains, gpos, groups, ous, sessions, users.
.../fixtures/TestVersion6ADCSJSON/ingest/*.json Added new JSON fixture files for version 6 ADCS ingestion: aiacas, computers, domains, enterprisecas, gpos, issuancepolicies, ntauthstores, ous, rootcas, users.
.../fixtures/TestVersion6AllJSON/ingest/*.json Added new JSON fixture files for version 6 all-entity ingestion: aiacas, computers, domains, enterprisecas, gpos, issuancepolicies, ntauthstores, ous, rootcas, users.
cmd/api/src/services/graphify/graphify_integration_test.go Improved database config parsing, added nil checks and error logging for database closure in test teardown.
cmd/api/src/services/graphify/tasks_integration_test.go Added multiple integration tests for version 5 and 6 ingestion (JSON and ZIP), verifying successful ingestion and graph correctness.
cmd/api/src/test/fixtures/fixtures/v6/all/ous.json Reformatted JSON for correct indentation and nesting; no content changes.
packages/go/lab/generic/graph.go Enhanced assertion in AssertDatabaseGraph to include descriptive error messages when expected nodes are missing.

Sequence Diagram(s)

sequenceDiagram
    participant TestSuite
    participant IngestionService
    participant Database
    participant FixtureLoader

    TestSuite->>FixtureLoader: Load fixture files (JSON/ZIP)
    TestSuite->>IngestionService: Ingest fixture data
    IngestionService->>Database: Insert/Update entities (computers, users, etc.)
    TestSuite->>Database: Retrieve graph state
    TestSuite->>FixtureLoader: Load expected graph
    TestSuite->>TestSuite: Assert actual vs expected graph
Loading

Suggested labels

api

Suggested reviewers

  • wes-mil
  • superlinkx

Poem

In the warren, fixtures grow,
JSON seeds in tidy rows.
Tests now hop from five to six,
Ingesting graphs with clever tricks.
With every node and every edge,
Our rabbits check, assert, and pledge—
The graph is right, the code is neat,
Another carrot-flavored feat! 🥕

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kpowderly
Copy link
Contributor Author

@coderabbitai full review

Copy link
Contributor

coderabbitai bot commented Jul 9, 2025

✅ Actions performed

Full review triggered.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (8)
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/rootcas.json (1)

44-54: Duplicate ACE entries inflate fixture size without adding semantic value

The same PrincipalSID (...-519) with identical RightName "GenericAll" appears twice – once with IsInherited=false (L44-48) and once with IsInherited=true (L50-54). Unless the ingestion logic explicitly needs both variants, consider removing one of them to keep the fixture concise and avoid confusion when counting effective rights.

cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/domains.json (1)

56-118: Several ACE rows repeat the same SID / right combination

Multiple PrincipalSID/RightName pairs (e.g. domain admins WriteDacl, WriteOwner, GetChanges) are duplicated within the same ACL block. If duplicated ACEs are not required for a specific edge-case test, trimming them will reduce noise and filesize.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/ntauthstores.json (1)

40-56: Redundant ACE repeats

The fixture lists the same “GenericAll” right for SID …-519 twice (once inherited, once not). Unless inheritance behaviour is under test, one entry should suffice.

cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/gpos.json (1)

22-56: Duplicate permission triplets for domain admins

For SID …-512 the trio WriteDacl, WriteOwner, GenericWrite is listed twice (L22-38 and L40-56). If duplicate ACEs are unintended, pruning them will streamline the test data.

cmd/api/src/api/v2/apiclient/analysisrequest.go (1)

23-23: Remove trailing space from import line.

There's an unnecessary trailing space at the end of the import line that should be removed for consistent formatting.

-	"github.com/specterops/bloodhound/cmd/api/src/model" 
+	"github.com/specterops/bloodhound/cmd/api/src/model"
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/ous.json (1)

30-67: ACE list duplicates inherited rights – optional size optimisation

Several ACEs differ only in IsInherited. While functionally correct, trimming duplicates where the inherited entry provides the same right can cut fixture size and ingest time for large suites. Not required, just a potential clean-up.

cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/computers.json (1)

67-84: Inconsistent key name LocalName vs. LocalNames

All other fixtures (v5 and v6) – and the SharpHound v5 schema docs – use the plural LocalNames.
Please confirm the parser really expects the singular form here; otherwise rename for consistency.

Also applies to: 95-110

cmd/api/src/services/graphify/tasks_integration_test.go (1)

102-180: Consider refactoring to reduce code duplication.

The TestVersion6AllJSON and TestVersion6ADCSJSON functions are nearly identical, differing only in their fixture paths. Consider extracting the common test logic into a helper function to improve maintainability.

Example refactor:

+func testVersion6JSONIngestion(t *testing.T, fixturePath string) {
+	t.Helper()
+	var (
+		ctx = context.Background()
+		testSuite = setupIntegrationTestSuite(t, fixturePath)
+		files = []string{
+			// ... file list
+		}
+	)
+	defer teardownIntegrationTestSuite(t, &testSuite)
+	// ... rest of test logic
+}

func TestVersion6AllJSON(t *testing.T) {
	t.Parallel()
-	var (
-		ctx = context.Background()
-		fixturesPath = path.Join("fixtures", t.Name(), "ingest")
-		// ... rest of implementation
-	)
+	testVersion6JSONIngestion(t, path.Join("fixtures", t.Name(), "ingest"))
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85bb2dc and 2a74033.

⛔ Files ignored due to path filters (4)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestZIP/ingest/archive.zip is excluded by !**/*.zip
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSZIP/ingest/archive.zip is excluded by !**/*.zip
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllZIP/ingest/archive.zip is excluded by !**/*.zip
  • cmd/api/src/services/graphify/fixtures/TestVersion6IngestZIP/ingest/archive.zip is excluded by !**/*.zip
📒 Files selected for processing (33)
  • cmd/api/src/api/v2/apiclient/analysisrequest.go (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/computers.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/containers.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/domains.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/gpos.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/groups.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/ous.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/sessions.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/users.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/aiacas.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/computers.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/domains.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/enterprisecas.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/gpos.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/issuancepolicies.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/ntauthstores.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/ous.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/rootcas.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/users.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/aiacas.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/computers.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/domains.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/enterprisecas.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/gpos.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/issuancepolicies.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/ntauthstores.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/ous.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/rootcas.json (1 hunks)
  • cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/users.json (1 hunks)
  • cmd/api/src/services/graphify/graphify_integration_test.go (2 hunks)
  • cmd/api/src/services/graphify/tasks_integration_test.go (3 hunks)
  • cmd/api/src/test/fixtures/fixtures/v6/all/ous.json (1 hunks)
  • packages/go/lab/generic/graph.go (1 hunks)
🧰 Additional context used
🧠 Learnings (32)
📓 Common learnings
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/rootcas.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/computers.json (2)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: definitelynotagoblin
PR: SpecterOps/BloodHound#1440
File: packages/go/analysis/ad/ntlm.go:123-138
Timestamp: 2025-05-23T19:56:13.423Z
Learning: In the BloodHound NTLM analysis code (packages/go/analysis/ad/ntlm.go), the `isProtectedComputer` function intentionally fails open (returns false/unprotected) when the Protected Users group cannot be retrieved, maintaining consistency with the original logic patterns in the codebase.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/aiacas.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/graphify_integration_test.go (2)
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
Learnt from: superlinkx
PR: SpecterOps/BloodHound#1503
File: cmd/api/src/services/job/jobs_test.go:19-143
Timestamp: 2025-05-27T16:58:33.295Z
Learning: Tests in cmd/api/src/services/job/jobs_test.go have been found to be flaky in the past and are due for rewrite. They should be skipped with t.Skip() until they can be properly rewritten.
cmd/api/src/api/v2/apiclient/analysisrequest.go (1)
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/rootcas.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/test/fixtures/fixtures/v6/all/ous.json (2)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: JonasBK
PR: SpecterOps/BloodHound#1434
File: packages/go/analysis/ad/gpos.go:102-126
Timestamp: 2025-06-18T08:27:18.317Z
Learning: In Active Directory's containment hierarchy, each user/computer has exactly one direct parent container, forming a tree structure. When processing GPO edges in packages/go/analysis/ad/gpos.go, the fetchDirectChildUsersAndComputers function only returns direct children, ensuring each user/computer is processed exactly once by its immediate parent container, eliminating the need for deduplication logic.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/ous.json (2)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/domains.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/ntauthstores.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/ntauthstores.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/domains.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/issuancepolicies.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/issuancepolicies.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/gpos.json (3)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
Learnt from: JonasBK
PR: SpecterOps/BloodHound#1434
File: packages/go/analysis/ad/gpos.go:78-85
Timestamp: 2025-06-18T08:29:51.923Z
Learning: In Active Directory environments, GPOs are very rarely applied to child objects on multiple levels, so optimizations for preventing duplication in GPO inheritance processing may not be worth the added code complexity.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/computers.json (2)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: definitelynotagoblin
PR: SpecterOps/BloodHound#1440
File: packages/go/analysis/ad/ntlm.go:123-138
Timestamp: 2025-05-23T19:56:13.423Z
Learning: In the BloodHound NTLM analysis code (packages/go/analysis/ad/ntlm.go), the `isProtectedComputer` function intentionally fails open (returns false/unprotected) when the Protected Users group cannot be retrieved, maintaining consistency with the original logic patterns in the codebase.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/containers.json (2)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: definitelynotagoblin
PR: SpecterOps/BloodHound#1440
File: packages/go/analysis/ad/ntlm.go:123-138
Timestamp: 2025-05-23T19:56:13.423Z
Learning: In the BloodHound NTLM analysis code (packages/go/analysis/ad/ntlm.go), the `isProtectedComputer` function intentionally fails open (returns false/unprotected) when the Protected Users group cannot be retrieved, maintaining consistency with the original logic patterns in the codebase.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/users.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/computers.json (2)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: definitelynotagoblin
PR: SpecterOps/BloodHound#1440
File: packages/go/analysis/ad/ntlm.go:123-138
Timestamp: 2025-05-23T19:56:13.423Z
Learning: In the BloodHound NTLM analysis code (packages/go/analysis/ad/ntlm.go), the `isProtectedComputer` function intentionally fails open (returns false/unprotected) when the Protected Users group cannot be retrieved, maintaining consistency with the original logic patterns in the codebase.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/enterprisecas.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/gpos.json (3)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
Learnt from: JonasBK
PR: SpecterOps/BloodHound#1434
File: packages/go/analysis/ad/gpos.go:78-85
Timestamp: 2025-06-18T08:29:51.923Z
Learning: In Active Directory environments, GPOs are very rarely applied to child objects on multiple levels, so optimizations for preventing duplication in GPO inheritance processing may not be worth the added code complexity.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/enterprisecas.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/aiacas.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/gpos.json (3)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
Learnt from: JonasBK
PR: SpecterOps/BloodHound#1434
File: packages/go/analysis/ad/gpos.go:78-85
Timestamp: 2025-06-18T08:29:51.923Z
Learning: In Active Directory environments, GPOs are very rarely applied to child objects on multiple levels, so optimizations for preventing duplication in GPO inheritance processing may not be worth the added code complexity.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/sessions.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/domains.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/groups.json (3)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: definitelynotagoblin
PR: SpecterOps/BloodHound#1440
File: packages/go/analysis/ad/ntlm.go:123-138
Timestamp: 2025-05-23T19:56:13.423Z
Learning: In the BloodHound NTLM analysis code (packages/go/analysis/ad/ntlm.go), the `isProtectedComputer` function intentionally fails open (returns false/unprotected) when the Protected Users group cannot be retrieved, maintaining consistency with the original logic patterns in the codebase.
Learnt from: JonasBK
PR: SpecterOps/BloodHound#1434
File: packages/go/analysis/ad/gpos.go:102-126
Timestamp: 2025-06-18T08:27:18.317Z
Learning: In Active Directory's containment hierarchy, each user/computer has exactly one direct parent container, forming a tree structure. When processing GPO edges in packages/go/analysis/ad/gpos.go, the fetchDirectChildUsersAndComputers function only returns direct children, ensuring each user/computer is processed exactly once by its immediate parent container, eliminating the need for deduplication logic.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/ous.json (2)
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/users.json (1)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
cmd/api/src/services/graphify/tasks_integration_test.go (5)
Learnt from: superlinkx
PR: SpecterOps/BloodHound#1503
File: cmd/api/src/services/job/jobs_test.go:19-143
Timestamp: 2025-05-27T16:58:33.295Z
Learning: Tests in cmd/api/src/services/job/jobs_test.go have been found to be flaky in the past and are due for rewrite. They should be skipped with t.Skip() until they can be properly rewritten.
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: elikmiller
PR: SpecterOps/BloodHound#1563
File: packages/go/graphschema/azure/azure.go:24-24
Timestamp: 2025-06-06T23:12:14.181Z
Learning: In BloodHound, files in packages/go/graphschema/*/`*.go` are generated from CUE schemas. When `just prepare-for-codereview` is run, it triggers code generation that may automatically add import aliases or other formatting changes. These changes are legitimate outputs of the generation process, not manual edits that would be overwritten.
Learnt from: LawsonWillard
PR: SpecterOps/BloodHound#1595
File: cmd/api/src/api/v2/saved_queries_test.go:2594-2594
Timestamp: 2025-06-17T22:37:36.389Z
Learning: In Go table-driven tests, there's a distinction between main test function parallelism and subtest parallelism. Main test functions can safely use t.Parallel() for performance benefits, but individual subtests within table-driven tests may need to run sequentially to avoid race conditions with mocks, deferred functions, or shared resources.
Learnt from: LawsonWillard
PR: SpecterOps/BloodHound#1595
File: cmd/api/src/api/v2/saved_queries_test.go:2197-2197
Timestamp: 2025-06-17T22:37:50.192Z
Learning: In Go tests using table-driven patterns, t.Parallel() at the function level allows test functions to run in parallel with other test functions, which is generally beneficial. However, when subtests contain deferred goroutines, the individual t.Run() calls should not use t.Parallel() to avoid flakiness. The comment "Tests will be flaky if run in parallel due to use of go routine in deferred function" specifically refers to subtest parallelization, not function-level parallelization.
cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/users.json (2)
Learnt from: mvlipka
PR: SpecterOps/BloodHound#1615
File: cmd/api/src/test/integration/harnesses/AZPIMRolesHarness.json:190-194
Timestamp: 2025-06-26T20:50:03.695Z
Learning: The JSON files in cmd/api/src/test/integration/harnesses/ directory (like AZPIMRolesHarness.json) are used as reference documents for writing Go test harnesses, not as actual data files that get parsed by the application code. Minor formatting issues like trailing spaces in these reference files don't affect functionality.
Learnt from: definitelynotagoblin
PR: SpecterOps/BloodHound#1440
File: packages/go/analysis/ad/ntlm.go:123-138
Timestamp: 2025-05-23T19:56:13.423Z
Learning: In the BloodHound NTLM analysis code (packages/go/analysis/ad/ntlm.go), the `isProtectedComputer` function intentionally fails open (returns false/unprotected) when the Protected Users group cannot be retrieved, maintaining consistency with the original logic patterns in the codebase.
🧬 Code Graph Analysis (1)
cmd/api/src/services/graphify/graphify_integration_test.go (1)
cmd/api/src/database/db.go (1)
  • Database (64-174)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build BloodHound Container Image / Build and Package Container
  • GitHub Check: run-analysis
  • GitHub Check: build-ui
  • GitHub Check: run-tests
🔇 Additional comments (25)
cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/users.json (1)

1-1461: Well-structured JSON fixture file for comprehensive user testing.

This fixture file provides extensive user data with realistic Active Directory attributes, ACEs, and metadata. The structure is consistent across all 14 user objects, making it suitable for thorough ingestion testing.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/gpos.json (1)

22-56: Potential duplicate ACE entries in GPO data.

The ACE entries for the first GPO contain duplicates - the same permissions (WriteDacl, WriteOwner, GenericWrite) are listed multiple times for the same principals (S-1-5-21-909015691-3030120388-2582151266-512). This pattern is repeated in the second GPO as well.

This duplication might be intentional for testing edge cases, but please verify if this accurately represents the expected test data structure.

packages/go/lab/generic/graph.go (1)

165-165: Excellent improvement to assertion error messaging.

Adding the descriptive error message "expected node %s" significantly improves debugging when tests fail by clearly indicating which specific node was expected but missing.

cmd/api/src/test/fixtures/fixtures/v6/all/ous.json (1)

2-81: Good JSON formatting improvements for better readability.

The reformatting corrects indentation and nesting throughout the file, making it more readable and maintainable while preserving all the original data values.

cmd/api/src/services/graphify/graphify_integration_test.go (2)

122-126: Robust connection string parsing implementation.

The changes improve parsing robustness by using strings.Fields() for whitespace splitting and adding validation to prevent panics on malformed input. This is a solid defensive programming approach.


158-165: No further action needed: error handling is consistent

  • GraphDB.Close(ctx) returns an error, which your teardown logs.
  • BloodhoundDB.Close(ctx) returns nothing and already logs any errors internally.
  • Both nil checks are in place to prevent panics during test cleanup.

The current teardown implementation is appropriate and requires no changes.

cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/sessions.json (1)

1-15: Ingest fixtures intentionally use count = 0 regardless of data length
The TestVersion5IngestJSON (and TestVersion6IngestJSON) fixtures always set meta.count to 0 by design, even when sample items are present. This pattern is consistent across all ingest fixtures and is meant to test the ingestion logic rather than reflect actual record counts—no changes needed.

cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/aiacas.json (1)

1-79: Well-structured CA fixture data.

The JSON structure is valid and contains comprehensive certificate authority data including properties, ACEs, and metadata. The count field correctly matches the data array length.

cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/ntauthstores.json (1)

1-73: Comprehensive NT authentication store fixture data.

The JSON structure is valid and contains detailed NT authentication store data including properties, certificate thumbprints, ACEs, and metadata. The count field correctly matches the data array length.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/rootcas.json (1)

1-78: Well-structured root CA fixture data.

The JSON structure is valid and contains comprehensive root certificate authority data including properties, certificate details, ACEs, and metadata. The count field correctly matches the data array length.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/issuancepolicies.json (2)

8-14: Duplicate ACL-protection flags – pick one canonical casing/value pair

Each object exposes the flag twice:
Properties.isaclprotected (lower-case)
• top-level IsACLProtected (upper-case)

If the ingestion schema only maps one of these, the other silently becomes dead weight or—worse—causes per-object ambiguity when the two values diverge. Please confirm the schema expects both fields; otherwise remove the redundant one and stick to the canonical casing.

Also applies to: 58-60


65-80: GroupLink.ObjectIdentifier is null while ObjectType is "Base"

Down-stream resolvers may interpret a null identifier as “link absent”; mixing that with a concrete ObjectType can break pointer dereferencing/edge construction. Verify this combination is valid for the Medium and High assurance policies; if the link is intentionally absent, consider omitting GroupLink entirely to avoid confusion.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/aiacas.json (1)

19-68: LGTM – schema fields and ACE structure look consistent

The CA fixture conforms to the existing v6 schema; the ACE array mirrors other fixtures and the meta block matches conventions. No issues spotted.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/domains.json (1)

1-20: First domain object lacks essential Properties.domain metadata

Entry at index 0 provides neither a domain nor name inside Properties, unlike the second object. If this is intended to represent a “placeholder/forest root”, confirm that the graphify loader handles missing fields gracefully; otherwise populate the standard domain attributes to avoid nil-pointer or validation errors.

cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/ous.json (1)

1-82: Fixture looks internally consistent – no action needed

meta.count matches the single OU entry and the JSON structure is valid.

cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/computers.json (1)

1-550: meta.count correctly reflects the two-computer payload

The metadata and payload sizes line up; nothing blocking here.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/users.json (1)

1-1460: Looks good – data count & schema align with v6 spec

meta.count (14) matches the number of user objects and the field naming is consistent with the existing v6 fixtures.
No issues spotted in this fixture.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/computers.json (1)

1-548: Fixture is internally consistent

meta.count correctly reflects 2 computer objects and field names follow the v6 convention (LocalGroups.LocalNames, etc.).
No action required.

cmd/api/src/services/graphify/fixtures/TestVersion6ADCSJSON/ingest/enterprisecas.json (1)

1-348: CA fixture validated

Single-object CA fixture; meta.count is correct and matches the companion v6 schema used elsewhere.
No concerns.

cmd/api/src/services/graphify/fixtures/TestVersion6AllJSON/ingest/enterprisecas.json (1)

1-348: Duplicate of v6 ADCS CA fixture is acceptable

The content intentionally mirrors the ADCS fixture for the “AllJSON” test suite.
No discrepancies detected.

cmd/api/src/services/graphify/fixtures/TestVersion5IngestJSON/ingest/users.json (1)

1-1467: Comprehensive version 5 user fixture data looks good.

This JSON fixture provides thorough test coverage for version 5 user ingestion with comprehensive Active Directory user properties, security descriptors, ACEs, SID history, and delegation permissions. The structure is well-formed and appropriate for integration testing.

cmd/api/src/services/graphify/tasks_integration_test.go (4)

32-65: Well-structured integration test for version 5 JSON ingestion.

The test follows good patterns with proper setup, comprehensive assertions, and graph verification. The use of t.Parallel() is appropriate for function-level parallelism.


182-208: Version 5 ZIP ingestion test is well-implemented.

The test correctly validates ZIP file processing with appropriate total count assertion (8 items) and proper graph verification.


238-292: ZIP ingestion tests follow consistent patterns.

The TestVersion6AllZIP and TestVersion6ADCSZIP functions are well-structured and consistent with the established test patterns. The total count assertions (13 items) are appropriate for the comprehensive fixture sets.


72-72: Fixture path update is consistent.

The change from "v6ingest" to "ingest" maintains consistency across all test functions and aligns with the new fixture directory structure.

@kpowderly kpowderly marked this pull request as ready for review July 9, 2025 16:39
@cweidenkeller
Copy link
Contributor

LGTM please squash commits tho =)

@kpowderly kpowderly merged commit a8dd294 into main Jul 9, 2025
9 checks passed
@kpowderly kpowderly deleted the BED-5725 branch July 9, 2025 19:18
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants