Sha256: 4a0d40e1cf7a013c1ca628c13129512d97d9583f435652f1982319eea7f159fd
Contents?: true
Size: 1.64 KB
Versions: 14
Compression:
Stored size: 1.64 KB
Contents
Shindo.tests('Fog::CDN[:hp] | container requests', ["hp"]) do @cdn_containers_format = [{ 'x-cdn-ssl-uri' => String, 'cdn_enabled' => Fog::Boolean, 'name' => String, 'x-cdn-uri' => String, 'ttl' => Integer, 'log_retention' => Fog::Boolean }] tests('success') do tests("#put_container('fogcdncontainertests')").succeeds do Fog::CDN[:hp].put_container('fogcdncontainertests') end tests("duplicate #put_container('fogcdncontainertests')").succeeds do Fog::CDN[:hp].put_container('fogcdncontainertests') end tests("#get_containers").formats(@cdn_containers_format) do Fog::CDN[:hp].get_containers.body end tests("#post_container('fogcdncontainertests', {'x-ttl' => 3200})").succeeds do Fog::CDN[:hp].post_container('fogcdncontainertests', {'x-ttl' => 3200}) end tests("#head_container('fogcdncontainertests')").succeeds do Fog::CDN[:hp].head_container('fogcdncontainertests') end tests("#delete_container('fogcdncontainertests')").succeeds do Fog::CDN[:hp].delete_container('fogcdncontainertests') end end tests('failure') do tests("#post_container('fognoncdncontainer', {'x-ttl' => 3200})").raises(Fog::CDN::HP::NotFound) do Fog::CDN[:hp].post_container('fogcdnnoncontainer', {'x-ttl' => 3200}) end tests("#head_container('fognoncdncontainer')").raises(Fog::CDN::HP::NotFound) do Fog::CDN[:hp].head_container('fognoncdncontainer') end tests("#delete_container('fognoncdncontainer')").raises(Fog::CDN::HP::NotFound) do Fog::CDN[:hp].delete_container('fognoncdncontainer') end end end
Version data entries
14 entries across 14 versions & 6 rubygems