Skip to content

Commit 6a4310a

Browse files
authored
Merge pull request #1031 from suketa/fix_confiig
Fix confiig
2 parents e60057b + decfc3e commit 6a4310a

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

test/duckdb_test/database_test.rb

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,19 @@ def test_s_open_argument
3939
end
4040

4141
def test_s_open_with_config
42-
library_version = Gem::Version.new(DuckDB::LIBRARY_VERSION)
43-
skip 'config test' if %w[1.4.0 1.4.1 1.4.2 1.4.3].include?(library_version.to_s)
44-
4542
config = DuckDB::Config.new
46-
config['default_order'] = 'DESC'
4743
db = DuckDB::Database.open(nil, config)
4844
conn = db.connect
49-
conn.execute('CREATE TABLE t (col1 INTEGER);')
50-
conn.execute('INSERT INTO t VALUES(3),(1),(4),(2);')
51-
r = conn.execute('SELECT * FROM t ORDER BY col1')
45+
r = conn.execute("SELECT current_setting('access_mode') AS access_mode;")
5246

53-
assert_equal([4], r.first)
47+
assert_equal('automatic', r.first.first)
5448

55-
config['default_order'] = 'ASC'
49+
config['access_mode'] = 'read_write'
5650
db = DuckDB::Database.open(nil, config)
5751
conn = db.connect
58-
conn.execute('CREATE TABLE t (col1 INTEGER);')
59-
conn.execute('INSERT INTO t VALUES(3),(1),(4),(2);')
60-
r = conn.execute('SELECT * FROM t ORDER BY col1')
52+
r = conn.execute("SELECT current_setting('access_mode') AS access_mode;")
6153

62-
assert_equal([1], r.first)
54+
assert_equal('read_write', r.first.first)
6355
end
6456

6557
def test_s_open_block

0 commit comments

Comments
 (0)