test/yao/resources/test_volume.rb in yao-0.19.0 vs test/yao/resources/test_volume.rb in yao-0.20.0
- old
+ new
@@ -11,11 +11,13 @@
'replication_status' => 'disabled',
'size' => 10,
'snapshot_id' => nil,
'status' => 'available',
'user_id' => 'aaaa166533fd49f3b11b1cdce2430000',
- 'volume_type' => 'test'
+ 'volume_type' => 'test',
+ 'created_at' => '2018-11-28T06:25:15.288987',
+ 'updated_at' => '2019-11-28T06:25:15.288987'
}
volume = Yao::Volume.new(params)
assert_equal(volume.attachments, [])
assert_equal(volume.availability_zone, 'test')
@@ -28,9 +30,13 @@
assert_equal(volume.size, 10)
assert_equal(volume.snapshot_id, nil)
assert_equal(volume.user_id, 'aaaa166533fd49f3b11b1cdce2430000')
assert_equal(volume.volume_type, 'test')
assert_equal(volume.type, 'test')
+ assert_equal(Time.parse('2018-11-28T06:25:15.288987'), volume.created_at)
+ assert_equal(Time.parse('2018-11-28T06:25:15.288987'), volume.created)
+ assert_equal(Time.parse('2019-11-28T06:25:15.288987'), volume.updated_at)
+ assert_equal(Time.parse('2019-11-28T06:25:15.288987'), volume.updated)
end
def test_list
# https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=#volumes-volumes
stub = stub_request(:get, "https://example.com:12345/volumes/detail").