Skip to content

test: fix failing tests with 2.0.0#131

Open
phanirithvij wants to merge 6 commits intotypesense:masterfrom
phanirithvij:v2.0.0-nix
Open

test: fix failing tests with 2.0.0#131
phanirithvij wants to merge 6 commits intotypesense:masterfrom
phanirithvij:v2.0.0-nix

Conversation

@phanirithvij
Copy link
Copy Markdown

@phanirithvij phanirithvij commented May 7, 2026

Change Summary

This pr adds a few fixes for pytest tests to succeed on linux as well as macos.

Required patches for updating to 2.0.0 in nixpkgs. NixOS/nixpkgs#503394

PR Checklist

@tharropoulos
Copy link
Copy Markdown
Contributor

It seems like the tests are running on an older version of Typesense. Is this a Nix upstream issue or did you run the server yourself?

@phanirithvij
Copy link
Copy Markdown
Author

The nix package during the build runs the typesense 29 which is the latest available version from nixpkgs during the test. I think #103 was also meant for this.

Apologies if this is not appropriate venue for discussing packaging issues.

The first patch is for fixing the tests on aarch64-darwin. If you have access to an M-series macOS please see if you can reproduce the test failures. I used github actions and it was failing consistently.

@tharropoulos
Copy link
Copy Markdown
Contributor

We'd like to first have this merged: NixOS/nixpkgs#516097

For the time being, I'll take this on to expect different shapes based on version, so tests are passing regardless of version

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
_endpoint_path is not a function anymore

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
rule_id is not found for this class but rule_name exists with the
expected value

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
These fields were removed at some point as they are not in the actual
output

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
@tharropoulos
Copy link
Copy Markdown
Contributor

@phanirithvij I've followed this up with #132 and #133

@phanirithvij
Copy link
Copy Markdown
Author

Thank you! I will try with both and let you know if it works for both 29 as well as 30.2

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.

2 participants