Skip to content

Add tests for rt.postgres.entity and related namespaces#258

Draft
google-labs-jules[bot] wants to merge 1 commit intomainfrom
tests-rt-postgres-3570875039998144682
Draft

Add tests for rt.postgres.entity and related namespaces#258
google-labs-jules[bot] wants to merge 1 commit intomainfrom
tests-rt-postgres-3570875039998144682

Conversation

@google-labs-jules
Copy link
Contributor

This PR adds comprehensive unit tests for rt.postgres.entity, rt.postgres.entity-util, rt.postgres.grammar.common, and rt.postgres.grammar.form-deftype. Previously, these files contained placeholder "TODO" tests.

The new tests cover:

  • Entity input validation and column generation logic.
  • Entity utility functions for type generation, defaults, and addon management.
  • Grammar formatting for publications, subscriptions, and control blocks.
  • Deftype generation logic, including fragment processing and column formatting.

The implementation handles mocking of global state and side effects where necessary (e.g., using with-redefs). It also corrects some assumptions about input types (e.g., symbols vs keywords) discovered during testing.


PR created automatically by Jules for task 3570875039998144682 started by @zcaudate

Replaces TODOs with actual tests in `rt.postgres.entity`, `rt.postgres.entity-util`,
`rt.postgres.grammar.common`, and `rt.postgres.grammar.form-deftype`.

- Implements tests for `E-check-input`, `E-entity-class-fields`, `E-addon-columns`, etc. in `entity_test.clj`.
- Implements tests for `default-application`, `type-*` functions, and helpers in `entity_util_test.clj`.
- Implements tests for formatting functions in `grammar/common_test.clj`.
- Implements tests for deftype helpers in `grammar/form_deftype_test.clj`.

Verification:
- All new tests pass.
- Verified input validation logic for entities and addons.
- Verified correct symbol/keyword handling in entity utilities.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

Comments