Skip to content

Commit c369222

Browse files
committed
update gocaves
1 parent 2ee80a6 commit c369222

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

test/collection_manager_test.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,17 @@ def test_create_collection_scope_does_not_exist
151151
coll_name = 'coll-1'
152152
scope_name = 'does-not-exist'
153153

154-
assert_raises(Error::ScopeNotFound) do
155-
@collection_manager.create_collection(scope_name, coll_name)
154+
if use_caves?
155+
# FIXME: caves should conform to the spec
156+
exc =
157+
assert_raises(Error::BucketNotFound) do
158+
@collection_manager.create_collection(scope_name, coll_name)
159+
end
160+
assert_match /scope_not_found/, exc.message
161+
else
162+
assert_raises(Error::ScopeNotFound) do
163+
@collection_manager.create_collection(scope_name, coll_name)
164+
end
156165
end
157166
end
158167

test/mock_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class Caves
2424
attr_accessor :verbose
2525

26-
VERSION = "v0.0.1-74".freeze
26+
VERSION = "v0.0.1-78".freeze
2727
FORK = "couchbaselabs".freeze
2828

2929
def download_mock(url = caves_url)
@@ -190,6 +190,8 @@ def caves_url
190190
go_os = case RUBY_PLATFORM
191191
when /linux/
192192
"linux-amd64"
193+
when /arm64-darwin/
194+
"macos-arm64"
193195
when /darwin/
194196
"macos"
195197
when /mingw/

test/scan_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def setup
4343
def teardown
4444
@test_ids.each do |id|
4545
@collection.remove(id)
46-
end
46+
end if defined? @test_ids
4747
end
4848

4949
def validate_scan(scan_result, expected_ids, ids_only: false)

test/test_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ def env
178178
end
179179

180180
def use_caves?
181+
env
181182
defined? @caves
182183
end
183184

0 commit comments

Comments
 (0)