Skip to content

Commit

Permalink
Fixing flaky integration tests (#1910)
Browse files Browse the repository at this point in the history
  • Loading branch information
caiosba authored Jun 5, 2024
1 parent fe6a0f9 commit 5c643cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/integration/api_version_integration_test.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
require_relative '../test_helper'

class ApiVersionIntegrationTest < ActionDispatch::IntegrationTest
def setup
super
setup do
redis = Redis.new(REDIS_CONFIG)
redis.flushdb
end

test "should get default version 1" do
Expand Down
5 changes: 5 additions & 0 deletions test/integration/dynamic_annotation_integration_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require_relative '../test_helper'

class DynamicAnnotationIntegrationTest < ActionDispatch::IntegrationTest
setup do
redis = Redis.new(REDIS_CONFIG)
redis.flushdb
end

test "should create task response free text" do
assert_nothing_raised do
at = create_annotation_type annotation_type: 'task_response_free_text', label: 'Task Response Free Text', description: 'Free text response that can added to a task'
Expand Down
5 changes: 5 additions & 0 deletions test/integration/short_url_integration_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require_relative '../test_helper'

class ShortUrlIntegrationTest < ActionDispatch::IntegrationTest
setup do
redis = Redis.new(REDIS_CONFIG)
redis.flushdb
end

test "should not access by other host other than the short host" do
assert_routing "#{CheckConfig.get('short_url_host')}/x1y2z3", { host: 'localhost', controller: 'shortener/shortened_urls', action: 'show', id: 'x1y2z3' }
end
Expand Down

0 comments on commit 5c643cf

Please sign in to comment.