Commit 3ebe67d5 authored by Stan Hu's avatar Stan Hu

FIx StorageShard spec

parent 910bbab6
......@@ -131,8 +131,11 @@ describe GeoNodeStatusEntity, :postgresql do
describe '#storage_shards' do
it 'returns the config' do
expect(subject[:storage_shards].first[:name]).to eq('default')
expect(subject[:storage_shards].first[:path]).to eq('/tmp/test')
shards = StorageShard.all
expect(subject[:storage_shards].count).to eq(shards.count)
expect(subject[:storage_shards].first[:name]).to eq(shards.first.name)
expect(subject[:storage_shards].first[:path]).to eq(shards.first.path)
end
end
end
......@@ -2,7 +2,7 @@ FactoryBot.define do
factory :geo_node_status do
sequence(:id)
geo_node
storage_shards { StorageShard.all.as_json }
storage_shards { StorageShard.all }
trait :healthy do
health nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment