Skip to content

Ground work for integration tests with real instance #43

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.2', '3.3']
ruby-version: ['3.0', '3.2', '3.3', '3.4']
services:
typesense:
image: typesense/typesense:28.0
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ typesense-server-peers
# rspec failure tracking
.rspec_status
typesense-data

# os files
.DS_Store
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require: rubocop-rspec
plugins:
- rubocop-rspec
- rubocop-rake

AllCops:
NewCops: enable
Expand Down
26 changes: 13 additions & 13 deletions Gemfile
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we leave dep bumps until after we've merged the test changes? Would prefer to avoid any side effects related to deps here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These updates only for dev dependencies, imo would be nice to update these to latest before hand?

Gem dependencies are declared in .gemspec file

Copy link
Contributor

Choose a reason for hiding this comment

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

Most of the dep bumps are specifically for testing, so they should be fine. Although, I feel like they should be left as the last thing, so we don't need to bisect if something goes wrong with any dependency.

Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Dev dependencies
gem 'awesome_print', '~> 1.8'
gem 'bundler', '~> 2.0'
gem 'codecov', '~> 0.1'
gem 'erb'
gem 'guard', '~> 2.16'
gem 'guard-rubocop', '~> 1.3'
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.9'
gem 'rspec_junit_formatter', '~> 0.4'
gem 'awesome_print', '~> 1.9'
gem 'bundler', '~> 2.2'
gem 'codecov', '~> 0.6'
gem 'erb', '~> 4.0'
gem 'guard', '~> 2.19'
gem 'guard-rubocop', '~> 1.5'
gem 'rake', '~> 13.2'
gem 'rspec', '~> 3.13'
gem 'rspec_junit_formatter', '~> 0.6'
gem 'rspec-legacy_formatters', '~> 1.0' # For codecov formatter
gem 'rubocop', '~> 1.12'
gem 'rubocop-rspec', '~> 2.4', require: false
gem 'simplecov', '~> 0.18'
gem 'rubocop', '~> 1.73'
gem 'rubocop-rake', '~> 0.7'
gem 'rubocop-rspec', '~> 3.5', require: false
gem 'timecop', '~> 0.9'
gem 'webmock', '~> 3.8'
gem 'webmock', '~> 3.25'

# Specify your gem's dependencies in typesense.gemspec
gemspec
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
require 'webmock/rspec'
require 'typesense'

WebMock.disable_net_connect!(allow_localhost: true)

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = '.rspec_status'
Expand Down
3 changes: 1 addition & 2 deletions spec/typesense/collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
let(:company_schema) do
{
'name' => 'companies',
'num_documents' => 0,
'fields' => [
{
'name' => 'company_name',
Expand All @@ -29,7 +28,7 @@
'facet' => true
}
],
'token_ranking_field' => 'num_employees'
'default_sorting_field' => 'num_employees'
}
end

Expand Down
3 changes: 1 addition & 2 deletions spec/typesense/collections_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
let(:company_schema) do
{
'name' => 'companies',
'num_documents' => 0,
'fields' => [
{
'name' => 'company_name',
Expand All @@ -29,7 +28,7 @@
'facet' => true
}
],
'token_ranking_field' => 'num_employees'
'default_sorting_field' => 'num_employees'
}
end

Expand Down
3 changes: 1 addition & 2 deletions spec/typesense/document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
let(:company_schema) do
{
'name' => 'companies',
'num_documents' => 0,
'fields' => [
{
'name' => 'company_name',
Expand All @@ -29,7 +28,7 @@
'facet' => true
}
],
'token_ranking_field' => 'num_employees'
'default_sorting_field' => 'num_employees'
}
end

Expand Down
3 changes: 1 addition & 2 deletions spec/typesense/documents_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
let(:company_schema) do
{
'name' => 'companies',
'num_documents' => 0,
'fields' => [
{
'name' => 'company_name',
Expand All @@ -29,7 +28,7 @@
'facet' => true
}
],
'token_ranking_field' => 'num_employees'
'default_sorting_field' => 'num_employees'
}
end

Expand Down