~prudhvikrishna/sqs/trunk

« back to all changes in this revision

Viewing changes to response_test.go

  • Committer: Prudhvi Krishna Surapaneni
  • Date: 2012-05-24 21:06:40 UTC
  • Revision ID: me@prudhvi.net-20120524210640-rt0mcxlp42v5kwze
Import SQS

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package sqs_test
 
2
 
 
3
var TestCreateQueueXmlOK = `
 
4
<CreateQueueResponse>
 
5
  <CreateQueueResult>
 
6
    <QueueUrl>http://sqs.us-east-1.amazonaws.com/123456789012/testQueue</QueueUrl>
 
7
  </CreateQueueResult>
 
8
  <ResponseMetadata>
 
9
    <RequestId>7a62c49f-347e-4fc4-9331-6e8e7a96aa73</RequestId>
 
10
  </ResponseMetadata>
 
11
</CreateQueueResponse>
 
12
`
 
13
 
 
14
var TestListQueuesXmlOK = `
 
15
<ListQueuesResponse>
 
16
  <ListQueuesResult>
 
17
    <QueueUrl>http://sqs.us-east-1.amazonaws.com/123456789012/testQueue</QueueUrl>
 
18
  </ListQueuesResult>
 
19
  <ResponseMetadata>
 
20
    <RequestId>725275ae-0b9b-4762-b238-436d7c65a1ac</RequestId>
 
21
  </ResponseMetadata>
 
22
</ListQueuesResponse>
 
23
`
 
24
 
 
25
var TestGetQueueUrlXmlOK = `
 
26
<GetQueueUrlResponse>
 
27
 <GetQueueUrlResult>
 
28
   <QueueUrl>http://sqs.us-east-1.amazonaws.com/123456789012/testQueue</QueueUrl>
 
29
 </GetQueueUrlResult>
 
30
 <ResponseMetadata>
 
31
   <RequestId>470a6f13-2ed9-4181-ad8a-2fdea142988e</RequestId>
 
32
 </ResponseMetadata>
 
33
</GetQueueUrlResponse>
 
34
`
 
35
 
 
36
var TestChangeMessageVisibilityXmlOK = `
 
37
<ChangeMessageVisibilityResponse>
 
38
 <ResponseMetadata>
 
39
  <RequestId>6a7a282a-d013-4a59-aba9-335b0fa48bed</RequestId>
 
40
 </ResponseMetadata>
 
41
</ChangeMessageVisibilityResponse>
 
42
`
 
43
 
 
44
var TestChangeMessaveVisibilityBatchXmlOK = `
 
45
<ChangeMessageVisibilityBatchResponse>
 
46
 <ChangeMessageVisibilityBatchResult>
 
47
  <ChangeMessageVisibilityBatchResultEntry>
 
48
   <Id>change_visibility_msg_2</Id>
 
49
  </ChangeMessageVisibilityBatchResultEntry>
 
50
 <ChangeMessageVisibilityBatchResultEntry>
 
51
   <Id>change_visibility_msg_3</Id>
 
52
 </ChangeMessageVisibilityBatchResultEntry>
 
53
 </ChangeMessageVisibilityBatchResult>
 
54
 <ResponseMetadata>
 
55
  <RequestId>ca9668f7-ab1b-4f7a-8859-f15747ab17a7</RequestId>
 
56
 </ResponseMetadata>
 
57
</ChangeMessageVisibilityBatchResponse>
 
58
`
 
59
 
 
60
var TestReceiveMessageXmlOK = `
 
61
<ReceiveMessageResponse>
 
62
  <ReceiveMessageResult>
 
63
    <Message>
 
64
      <MessageId>5fea7756-0ea4-451a-a703-a558b933e274</MessageId>
 
65
      <ReceiptHandle>MbZj6wDWli+JvwwJaBV+3dcjk2YW2vA3+STFFljTM8tJJg6HRG6PYSasuWXPJB+CwLj1FjgXUv1uSj1gUPAWV66FU/WeR4mq2OKpEGYWbnLmpRCJVAyeMjeU5ZBdtcQ+QEauMZc8ZRv37sIW2iJKq3M9MFx1YvV11A2x/KSbkJ0=</ReceiptHandle>
 
66
      <MD5OfBody>fafb00f5732ab283681e124bf8747ed1</MD5OfBody>
 
67
      <Body>This is a test message</Body>
 
68
      <Attribute>
 
69
        <Name>SenderId</Name>
 
70
        <Value>195004372649</Value>
 
71
      </Attribute>                                                                                                                   
 
72
      <Attribute>
 
73
        <Name>SentTimestamp</Name>
 
74
        <Value>1238099229000</Value>
 
75
      </Attribute>
 
76
      <Attribute>
 
77
        <Name>ApproximateReceiveCount</Name>
 
78
        <Value>5</Value>
 
79
      </Attribute>
 
80
      <Attribute>
 
81
        <Name>ApproximateFirstReceiveTimestamp</Name>
 
82
        <Value>1250700979248</Value>
 
83
      </Attribute>
 
84
    </Message>
 
85
  </ReceiveMessageResult>
 
86
<ResponseMetadata>
 
87
  <RequestId>b6633655-283d-45b4-aee4-4e84e0ae6afa</RequestId>
 
88
</ResponseMetadata>
 
89
</ReceiveMessageResponse>
 
90
`
 
91
 
 
92
var TestDeleteMessageXmlOK = `
 
93
<DeleteQueueResponse>
 
94
  <ResponseMetadata>
 
95
    <RequestId>b5293cb5-d306-4a17-9048-b263635abe42</RequestId>
 
96
  </ResponseMetadata>
 
97
</DeleteQueueResponse>
 
98
`
 
99
 
 
100
var TestSendMessageXmlOK = `
 
101
<SendMessageResponse>
 
102
  <SendMessageResult>
 
103
    <MD5OfMessageBody>fafb00f5732ab283681e124bf8747ed1</MD5OfMessageBody>
 
104
    <MessageId>5fea7756-0ea4-451a-a703-a558b933e274</MessageId>
 
105
  </SendMessageResult>
 
106
  <ResponseMetadata>
 
107
    <RequestId>27daac76-34dd-47df-bd01-1f6e873584a0</RequestId>
 
108
  </ResponseMetadata>
 
109
</SendMessageResponse>
 
110
`
 
111
 
 
112
var TestSendMessageBatchXmlOK = `
 
113
<SendMessageBatchResponse>
 
114
<SendMessageBatchResult>
 
115
    <SendMessageBatchResultEntry>
 
116
        <Id>test_msg_001</Id>
 
117
        <MessageId>0a5231c7-8bff-4955-be2e-8dc7c50a25fa</MessageId>
 
118
        <MD5OfMessageBody>0e024d309850c78cba5eabbeff7cae71</MD5OfMessageBody>
 
119
    </SendMessageBatchResultEntry>
 
120
    <SendMessageBatchResultEntry>
 
121
        <Id>test_msg_002</Id>
 
122
        <MessageId>15ee1ed3-87e7-40c1-bdaa-2e49968ea7e9</MessageId>
 
123
        <MD5OfMessageBody>7fb8146a82f95e0af155278f406862c2</MD5OfMessageBody>
 
124
    </SendMessageBatchResultEntry>
 
125
</SendMessageBatchResult>
 
126
<ResponseMetadata>
 
127
    <RequestId>ca1ad5d0-8271-408b-8d0f-1351bf547e74</RequestId>
 
128
</ResponseMetadata>
 
129
</SendMessageBatchResponse>
 
130
`
 
131
 
 
132
var TestGetQueueAttributesAllXmlOK = `
 
133
<GetQueueAttributesResponse>
 
134
  <GetQueueAttributesResult>
 
135
    <Attribute>
 
136
      <Name>VisibilityTimeout</Name>
 
137
      <Value>30</Value>
 
138
    </Attribute>
 
139
    <Attribute>
 
140
      <Name>ApproximateNumberOfMessages</Name>
 
141
      <Value>0</Value>
 
142
    </Attribute>
 
143
    <Attribute>
 
144
      <Name>ApproximateNumberOfMessagesNotVisible</Name>
 
145
      <Value>0</Value>
 
146
    </Attribute>
 
147
    <Attribute>
 
148
      <Name>CreatedTimestamp</Name>
 
149
      <Value>1286771522</Value>
 
150
    </Attribute>
 
151
    <Attribute>
 
152
      <Name>LastModifiedTimestamp</Name>
 
153
      <Value>1286771522</Value>
 
154
    </Attribute>
 
155
    <Attribute>
 
156
      <Name>QueueArn</Name>
 
157
      <Value>arn:aws:sqs:us-east-1:123456789012:qfoo</Value>
 
158
    </Attribute>
 
159
    <Attribute>
 
160
      <Name>MaximumMessageSize</Name>
 
161
      <Value>8192</Value>
 
162
    </Attribute>
 
163
    <Attribute>
 
164
      <Name>MessageRetentionPeriod</Name>
 
165
      <Value>345600</Value>
 
166
    </Attribute>
 
167
  </GetQueueAttributesResult>
 
168
  <ResponseMetadata>
 
169
    <RequestId>1ea71be5-b5a2-4f9d-b85a-945d8d08cd0b</RequestId>
 
170
  </ResponseMetadata>
 
171
</GetQueueAttributesResponse>
 
172
`
 
173
 
 
174
var TestGetQueueAttributesSelectiveXmlOK = `
 
175
<GetQueueAttributesResponse>
 
176
  <GetQueueAttributesResult>
 
177
    <Attribute>
 
178
      <Name>VisibilityTimeout</Name>
 
179
      <Value>30</Value>
 
180
    </Attribute>
 
181
    <Attribute>
 
182
      <Name>DelaySeconds</Name>
 
183
      <Value>0</Value>
 
184
    </Attribute>
 
185
 </GetQueueAttributesResult>
 
186
  <ResponseMetadata>
 
187
    <RequestId>1ea71be5-b5a2-4f9d-b85a-945d8d08cd0b</RequestId>
 
188
  </ResponseMetadata>
 
189
</GetQueueAttributesResponse>
 
190
`
 
191
 
 
192
var TestDeleteMessageBatchXmlOK = `
 
193
<DeleteMessageBatchResponse>
 
194
    <DeleteMessageBatchResult>
 
195
        <DeleteMessageBatchResultEntry>
 
196
            <Id>msg1</Id>
 
197
        </DeleteMessageBatchResultEntry>
 
198
        <DeleteMessageBatchResultEntry>
 
199
            <Id>msg2</Id>
 
200
        </DeleteMessageBatchResultEntry>
 
201
    </DeleteMessageBatchResult>
 
202
    <ResponseMetadata>
 
203
        <RequestId>d6f86b7a-74d1-4439-b43f-196a1e29cd85</RequestId>
 
204
    </ResponseMetadata>
 
205
</DeleteMessageBatchResponse>
 
206
`
 
207
 
 
208
var TestAddPermissionXmlOK = `
 
209
<AddPermissionResponse>
 
210
    <ResponseMetadata>
 
211
        <RequestId>9a285199-c8d6-47c2-bdb2-314cb47d599d</RequestId>
 
212
    </ResponseMetadata>
 
213
</AddPermissionResponse>
 
214
`
 
215
 
 
216
var TestRemovePermissionXmlOK = `
 
217
<RemovePermissionResponse>
 
218
    <ResponseMetadata>
 
219
        <RequestId>f8bdb362-6616-42c0-977a-ce9a8bcce3bb</RequestId>
 
220
    </ResponseMetadata>
 
221
</RemovePermissionResponse>
 
222
`
 
223
 
 
224
var TestDeleteQueueXmlOK = `
 
225
<DeleteQueueResponse>
 
226
    <ResponseMetadata>
 
227
        <RequestId>6fde8d1e-52cd-4581-8cd9-c512f4c64223</RequestId>
 
228
    </ResponseMetadata>
 
229
</DeleteQueueResponse>
 
230
`
 
231
 
 
232
var TestSetQueueAttributesXmlOK = `
 
233
<SetQueueAttributesResponse>
 
234
    <ResponseMetadata>
 
235
        <RequestId>e5cca473-4fc0-4198-a451-8abb94d02c75</RequestId>
 
236
    </ResponseMetadata>
 
237
</SetQueueAttributesResponse>
 
238
`