Skip to content

Commit 71ba40a

Browse files
BuonOmorafiss
authored andcommitted
refactor(test): get rid of ARCONN env.
In order to simplify testing, I am reducing its branching. Since we always want to work with the cockroachdb adapter, lets set it as default overall in this repository using the `test/config.yml` file accordingly.
1 parent be2a6b3 commit 71ba40a

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

Rakefile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ require_relative 'test/support/paths_cockroachdb'
44
require_relative 'test/support/rake_helpers'
55
require_relative 'test/support/template_creator'
66

7-
task test: ["test:cockroachdb"]
87
task default: [:test]
98

109
namespace :db do
1110
task "create_test_template" do
1211
ENV['DEBUG_COCKROACHDB_ADAPTER'] = "1"
1312
ENV['COCKROACH_SKIP_LOAD_SCHEMA'] = "1"
14-
ENV["ARCONN"] = "cockroachdb"
1513

1614
TemplateCreator.connect
1715
require_relative 'test/cases/helper'
@@ -26,17 +24,9 @@ namespace :db do
2624
end
2725
end
2826

29-
namespace :test do
30-
Rake::TestTask.new("cockroachdb") do |t|
31-
t.libs = ARTest::CockroachDB.test_load_paths
32-
t.test_files = test_files
33-
t.warning = !!ENV["WARNING"]
34-
t.verbose = false
35-
end
36-
37-
task "cockroachdb:env" do
38-
ENV["ARCONN"] = "cockroachdb"
39-
end
27+
Rake::TestTask.new do |t|
28+
t.libs = ARTest::CockroachDB.test_load_paths
29+
t.test_files = test_files
30+
t.warning = !!ENV["WARNING"]
31+
t.verbose = false
4032
end
41-
42-
task 'test:cockroachdb' => 'test:cockroachdb:env'

test/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
default_connection: cockroachdb
12
connections:
23
cockroachdb:
34
arunit:

0 commit comments

Comments
 (0)