Ejemplo n.º 1
0
        public void test_head_container()
        {
            var container_name = prefix + Guid.NewGuid().ToString();

            created_containers.Add(container_name);
            client.PutContainer(storage_url, auth_token, container_name, new Dictionary <string, string>(), new Dictionary <string, string>());
            var res = client.HeadContainer(storage_url, auth_token, container_name, new Dictionary <string, string>(), new Dictionary <string, string>());

            foreach (var header in container_headers)
            {
                Assert.IsTrue(res.Headers.ContainsKey(header),
                              "Header: " + header);
            }
        }
Ejemplo n.º 2
0
        public void test_head_container()
        {
            _headers.Add("request-type", "container");
            ContainerResponse res = _client.HeadContainer("", "", "", _headers, new Dictionary <string, string>());

            Assert.True(res.Headers.ContainsKey("x-container-object-count"));
            Assert.True(res.Headers["x-container-object-count"] == "1");
            Assert.True(res.Headers.ContainsKey("x-container-bytes-used"));
            Assert.True(res.Headers["x-container-bytes-used"] == "1");
            Assert.True(res.Headers.ContainsKey("x-container-meta-foo"));
            Assert.True(res.Headers["x-container-meta-foo"] == "foo");
            Assert.True(res.Reason == "foo");
            Assert.True(res.Status == 201);
        }