Lines Matching refs:chk

8 	chk "gopkg.in/check.v1" // go get gopkg.in/check.v1  packageName
11 func (s *aztestsSuite) TestGetAccountInfo(c *chk.C) {
16 c.Assert(err, chk.IsNil)
17 c.Assert(*sAccInfo, chk.Not(chk.DeepEquals), ServiceGetAccountInfoResponse{})
23 c.Assert(err, chk.IsNil)
25 c.Assert(err, chk.IsNil)
26 c.Assert(*cAccInfo, chk.Not(chk.DeepEquals), ContainerGetAccountInfoResponse{})
31 c.Assert(err, chk.IsNil)
33 c.Assert(err, chk.IsNil)
34 c.Assert(*bAccInfo, chk.Not(chk.DeepEquals), BlobGetAccountInfoResponse{})
37 func (s *aztestsSuite) TestListContainers(c *chk.C) {
40 c.Assert(err, chk.IsNil)
41 c.Assert(resp.Response().StatusCode, chk.Equals, 200)
42 c.Assert(resp.RequestID(), chk.Not(chk.Equals), "")
43 c.Assert(resp.Version(), chk.Not(chk.Equals), "")
44 c.Assert(len(resp.ContainerItems) >= 0, chk.Equals, true)
45 c.Assert(resp.ServiceEndpoint, chk.NotNil)
55 c.Assert(err, chk.IsNil)
58 c.Assert(err, chk.IsNil)
59 c.Assert(resp.ContainerItems, chk.HasLen, 1)
60 c.Assert(resp.ContainerItems[0].Name, chk.NotNil)
61 c.Assert(resp.ContainerItems[0].Properties, chk.NotNil)
62 c.Assert(resp.ContainerItems[0].Properties.LastModified, chk.NotNil)
63 c.Assert(resp.ContainerItems[0].Properties.Etag, chk.NotNil)
64 c.Assert(resp.ContainerItems[0].Properties.LeaseStatus, chk.Equals, LeaseStatusUnlocked)
65 c.Assert(resp.ContainerItems[0].Properties.LeaseState, chk.Equals, LeaseStateAvailable)
66 c.Assert(string(resp.ContainerItems[0].Properties.LeaseDuration), chk.Equals, "")
67 …c.Assert(string(resp.ContainerItems[0].Properties.PublicAccess), chk.Equals, string(PublicAccessNo…
68 c.Assert(resp.ContainerItems[0].Metadata, chk.DeepEquals, md)
71 func (s *aztestsSuite) TestListContainersPaged(c *chk.C) {
94 c.Assert(err, chk.IsNil)
95 c.Assert(resp.ContainerItems, chk.HasLen, maxResultsPerPage)
98 c.Assert(resp.NextMarker.NotDone(), chk.Equals, hasMore)
103 func (s *aztestsSuite) TestAccountListContainersEmptyPrefix(c *chk.C) {
112 c.Assert(err, chk.IsNil)
113 …c.Assert(len(response.ContainerItems) >= 2, chk.Equals, true) // The response should contain at le…
116 func (s *aztestsSuite) TestAccountListContainersIncludeTypeMetadata(c *chk.C) {
125 c.Assert(err, chk.IsNil)
130 c.Assert(err, chk.IsNil)
131 c.Assert(response.ContainerItems[0].Name, chk.Equals, nameNoMetadata)
132 c.Assert(response.ContainerItems[0].Metadata, chk.HasLen, 0)
133 c.Assert(response.ContainerItems[1].Name, chk.Equals, nameMetadata)
134 c.Assert(response.ContainerItems[1].Metadata, chk.DeepEquals, basicMetadata)
137 func (s *aztestsSuite) TestAccountListContainersMaxResultsNegative(c *chk.C) {
144 c.Assert(err, chk.Not(chk.IsNil))
147 func (s *aztestsSuite) TestAccountListContainersMaxResultsZero(c *chk.C) {
157 c.Assert(err, chk.IsNil)
159 c.Assert(len(resp.ContainerItems) >= 1, chk.Equals, true)
162 func (s *aztestsSuite) TestAccountListContainersMaxResultsExact(c *chk.C) {
173 c.Assert(err, chk.IsNil)
174 c.Assert(response.ContainerItems, chk.HasLen, 2)
175 c.Assert(response.ContainerItems[0].Name, chk.Equals, containerName1)
176 c.Assert(response.ContainerItems[1].Name, chk.Equals, containerName2)
179 func (s *aztestsSuite) TestAccountListContainersMaxResultsInsufficient(c *chk.C) {
189 c.Assert(err, chk.IsNil)
190 c.Assert(len(response.ContainerItems), chk.Equals, 1)
193 func (s *aztestsSuite) TestAccountListContainersMaxResultsSufficient(c *chk.C) {
203 c.Assert(err, chk.IsNil)
206 c.Assert(len(response.ContainerItems) >= 2, chk.Equals, true)
209 func (s *aztestsSuite) TestAccountDeleteRetentionPolicy(c *chk.C) {
214 c.Assert(err, chk.IsNil)
220 c.Assert(err, chk.IsNil)
221 c.Assert(resp.DeleteRetentionPolicy.Enabled, chk.Equals, true)
222 c.Assert(*resp.DeleteRetentionPolicy.Days, chk.Equals, int32(5))
225 c.Assert(err, chk.IsNil)
231 c.Assert(err, chk.IsNil)
232 c.Assert(resp.DeleteRetentionPolicy.Enabled, chk.Equals, false)
233 c.Assert(resp.DeleteRetentionPolicy.Days, chk.IsNil)
236 func (s *aztestsSuite) TestAccountDeleteRetentionPolicyEmpty(c *chk.C) {
241 c.Assert(err, chk.IsNil)
247 c.Assert(err, chk.IsNil)
248 c.Assert(resp.DeleteRetentionPolicy.Enabled, chk.Equals, true)
249 c.Assert(*resp.DeleteRetentionPolicy.Days, chk.Equals, int32(5))
253 c.Assert(err, chk.IsNil)
259 c.Assert(err, chk.IsNil)
260 c.Assert(resp.DeleteRetentionPolicy.Enabled, chk.Equals, false)
261 c.Assert(resp.DeleteRetentionPolicy.Days, chk.IsNil)
264 func (s *aztestsSuite) TestAccountDeleteRetentionPolicyNil(c *chk.C) {
269 c.Assert(err, chk.IsNil)
275 c.Assert(err, chk.IsNil)
276 c.Assert(resp.DeleteRetentionPolicy.Enabled, chk.Equals, true)
277 c.Assert(*resp.DeleteRetentionPolicy.Days, chk.Equals, int32(5))
280 c.Assert(err, chk.IsNil)
287 c.Assert(err, chk.IsNil)
288 c.Assert(resp.DeleteRetentionPolicy.Enabled, chk.Equals, true)
289 c.Assert(*resp.DeleteRetentionPolicy.Days, chk.Equals, int32(5))
295 func (s *aztestsSuite) TestAccountDeleteRetentionPolicyDaysTooSmall(c *chk.C) {
300 c.Assert(strings.Contains(err.Error(), validationErrorSubstring), chk.Equals, true)
303 func (s *aztestsSuite) TestAccountDeleteRetentionPolicyDaysTooLarge(c *chk.C) {
311 func (s *aztestsSuite) TestAccountDeleteRetentionPolicyDaysOmitted(c *chk.C) {