azkaban_scheduler 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -0
- data.tar.gz.sig +2 -0
- data/.travis.yml +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +26 -3
- data/azkaban_scheduler.gemspec +3 -1
- data/lib/azkaban_scheduler/session.rb +33 -0
- data/lib/azkaban_scheduler/version.rb +1 -1
- data/test/fixtures/setup_once.yml +126 -0
- data/test/fixtures/test_create_and_upload_project.yml +132 -0
- data/test/fixtures/test_create_existing_project.yml +107 -0
- data/test/fixtures/test_create_project_with_invalid_name.yml +36 -0
- data/test/fixtures/test_delete_missing_project.yml +40 -0
- data/test/fixtures/test_post_schedule.yml +332 -0
- data/test/fixtures/test_start_with_incorrect_password.yml +43 -0
- data/test/fixtures/test_upload_missing_project.yml +61 -0
- data/test/session_test.rb +55 -32
- data/test/test_helper.rb +23 -1
- metadata +107 -40
- metadata.gz.sig +1 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: <URL>/manager
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: session.id=bf83e117-1705-4a13-80e0-435a6f41a92a&action=create&name=Azkaban_Scheduler_Test&description=
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Mon, 15 Sep 2014 17:55:55 GMT
|
25
|
+
Transfer-Encoding:
|
26
|
+
- chunked
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
P3p:
|
30
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: '{"message":"Description cannot be empty.","status":"error"}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Mon, 15 Sep 2014 17:55:55 GMT
|
36
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: <URL>/manager?delete=true&project=Azkaban_Scheduler_Test&session.id=bf83e117-1705-4a13-80e0-435a6f41a92a
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 302
|
17
|
+
message: Found
|
18
|
+
headers:
|
19
|
+
Server:
|
20
|
+
- nginx
|
21
|
+
Date:
|
22
|
+
- Mon, 15 Sep 2014 17:55:53 GMT
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- close
|
27
|
+
Expires:
|
28
|
+
- Thu, 01-Jan-1970 00:00:00 GMT
|
29
|
+
Set-Cookie:
|
30
|
+
- azkaban.failure.message="Project Azkaban_Scheduler_Test doesn't exist.";Path=/
|
31
|
+
Location:
|
32
|
+
- <HTTP_URL>/
|
33
|
+
P3p:
|
34
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ''
|
38
|
+
http_version:
|
39
|
+
recorded_at: Mon, 15 Sep 2014 17:55:53 GMT
|
40
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,332 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: <URL>/manager
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: session.id=bf83e117-1705-4a13-80e0-435a6f41a92a&action=create&name=Azkaban_Scheduler_Test&description=Used+by+the+test+suite
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Mon, 15 Sep 2014 17:55:53 GMT
|
25
|
+
Transfer-Encoding:
|
26
|
+
- chunked
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
P3p:
|
30
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: '{"status":"success","path":"manager?project=Azkaban_Scheduler_Test","action":"redirect"}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Mon, 15 Sep 2014 17:55:53 GMT
|
36
|
+
- request:
|
37
|
+
method: post
|
38
|
+
uri: <URL>/manager
|
39
|
+
body:
|
40
|
+
encoding: ASCII-8BIT
|
41
|
+
string: !binary |-
|
42
|
+
LS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0DQpDb250ZW50LURpc3Bv
|
43
|
+
c2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9InNlc3Npb24uaWQiDQoNCmJmODNl
|
44
|
+
MTE3LTE3MDUtNGExMy04MGUwLTQzNWE2ZjQxYTkyYQ0KLS0tLS0tLS0tLS0t
|
45
|
+
LVJ1YnlNdWx0aXBhcnRQb3N0DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3Jt
|
46
|
+
LWRhdGE7IG5hbWU9ImFqYXgiDQoNCnVwbG9hZA0KLS0tLS0tLS0tLS0tLVJ1
|
47
|
+
YnlNdWx0aXBhcnRQb3N0DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRh
|
48
|
+
dGE7IG5hbWU9InByb2plY3QiDQoNCkF6a2FiYW5fU2NoZWR1bGVyX1Rlc3QN
|
49
|
+
Ci0tLS0tLS0tLS0tLS1SdWJ5TXVsdGlwYXJ0UG9zdA0KQ29udGVudC1EaXNw
|
50
|
+
b3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9ImZp
|
51
|
+
bGUuemlwIg0KQ29udGVudC1MZW5ndGg6IDE1Mg0KQ29udGVudC1UeXBlOiBh
|
52
|
+
cHBsaWNhdGlvbi96aXANCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJp
|
53
|
+
bmFyeQ0KDQpQSwMEFAAAAAgA+m4vReVaWxgkAAAAKAAAAAkAAABmaXJzdC5q
|
54
|
+
b2IrqSxItU3Oz81NzEvhgtK2qckZ+QpKGak5OfkK5flFOSlKXABQSwECNAMU
|
55
|
+
AAAACAD6bi9F5VpbGCQAAAAoAAAACQAAAAAAAAABAAAApIEAAAAAZmlyc3Qu
|
56
|
+
am9iUEsFBgAAAAABAAEANwAAAEsAAAAAAA0KLS0tLS0tLS0tLS0tLVJ1YnlN
|
57
|
+
dWx0aXBhcnRQb3N0LS0NCg0K
|
58
|
+
headers:
|
59
|
+
Accept:
|
60
|
+
- application/json
|
61
|
+
User-Agent:
|
62
|
+
- Ruby
|
63
|
+
Content-Type:
|
64
|
+
- multipart/form-data; boundary=-----------RubyMultipartPost
|
65
|
+
Content-Length:
|
66
|
+
- '693'
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 200
|
70
|
+
message: OK
|
71
|
+
headers:
|
72
|
+
Server:
|
73
|
+
- nginx
|
74
|
+
Date:
|
75
|
+
- Mon, 15 Sep 2014 17:55:54 GMT
|
76
|
+
Content-Type:
|
77
|
+
- application/json
|
78
|
+
Transfer-Encoding:
|
79
|
+
- chunked
|
80
|
+
Connection:
|
81
|
+
- close
|
82
|
+
Vary:
|
83
|
+
- Accept-Encoding
|
84
|
+
P3p:
|
85
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
86
|
+
body:
|
87
|
+
encoding: US-ASCII
|
88
|
+
string: |-
|
89
|
+
{
|
90
|
+
"projectId" : "141",
|
91
|
+
"version" : "1"
|
92
|
+
}
|
93
|
+
http_version:
|
94
|
+
recorded_at: Mon, 15 Sep 2014 17:55:54 GMT
|
95
|
+
- request:
|
96
|
+
method: post
|
97
|
+
uri: <URL>/schedule
|
98
|
+
body:
|
99
|
+
encoding: US-ASCII
|
100
|
+
string: ajax=scheduleFlow&project=Azkaban_Scheduler_Test&projectName=Azkaban_Scheduler_Test&projectId=141&flow=first&disabled=%5B%5D&period=6h&scheduleTime=09%2C35%2CPM%2CUTC&scheduleDate=09%2F10%2F2014&is_recurring=on&concurrentOption=skip&failureEmailsOverride=true&successEmailsOverride=false&failureAction=finishCurrent&failureEmails=azkaban-scheduler-test%40localhost&successEmails=¬ifyFailureFirst=false¬ifyFailureLast=false
|
101
|
+
headers:
|
102
|
+
Accept:
|
103
|
+
- application/json
|
104
|
+
User-Agent:
|
105
|
+
- Ruby
|
106
|
+
Content-Type:
|
107
|
+
- application/x-www-form-urlencoded
|
108
|
+
Cookie:
|
109
|
+
- azkaban.browser.session.id=bf83e117-1705-4a13-80e0-435a6f41a92a
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 200
|
113
|
+
message: OK
|
114
|
+
headers:
|
115
|
+
Server:
|
116
|
+
- nginx
|
117
|
+
Date:
|
118
|
+
- Mon, 15 Sep 2014 17:55:54 GMT
|
119
|
+
Content-Type:
|
120
|
+
- application/json
|
121
|
+
Transfer-Encoding:
|
122
|
+
- chunked
|
123
|
+
Connection:
|
124
|
+
- close
|
125
|
+
Vary:
|
126
|
+
- Accept-Encoding
|
127
|
+
P3p:
|
128
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
129
|
+
body:
|
130
|
+
encoding: US-ASCII
|
131
|
+
string: |-
|
132
|
+
{
|
133
|
+
"message" : "Azkaban_Scheduler_Test.first scheduled.",
|
134
|
+
"status" : "success"
|
135
|
+
}
|
136
|
+
http_version:
|
137
|
+
recorded_at: Mon, 15 Sep 2014 17:55:54 GMT
|
138
|
+
- request:
|
139
|
+
method: post
|
140
|
+
uri: <URL>/schedule
|
141
|
+
body:
|
142
|
+
encoding: US-ASCII
|
143
|
+
string: ajax=loadFlow
|
144
|
+
headers:
|
145
|
+
Accept:
|
146
|
+
- application/json
|
147
|
+
User-Agent:
|
148
|
+
- Ruby
|
149
|
+
Content-Type:
|
150
|
+
- application/x-www-form-urlencoded
|
151
|
+
Cookie:
|
152
|
+
- azkaban.browser.session.id=bf83e117-1705-4a13-80e0-435a6f41a92a
|
153
|
+
response:
|
154
|
+
status:
|
155
|
+
code: 200
|
156
|
+
message: OK
|
157
|
+
headers:
|
158
|
+
Server:
|
159
|
+
- nginx
|
160
|
+
Date:
|
161
|
+
- Mon, 15 Sep 2014 17:55:54 GMT
|
162
|
+
Content-Type:
|
163
|
+
- application/json
|
164
|
+
Transfer-Encoding:
|
165
|
+
- chunked
|
166
|
+
Connection:
|
167
|
+
- close
|
168
|
+
Vary:
|
169
|
+
- Accept-Encoding
|
170
|
+
P3p:
|
171
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
172
|
+
body:
|
173
|
+
encoding: US-ASCII
|
174
|
+
string: |-
|
175
|
+
{
|
176
|
+
"items" : [ {
|
177
|
+
"history" : false,
|
178
|
+
"time" : 1410384900000,
|
179
|
+
"scheduleid" : 2200,
|
180
|
+
"stats" : {
|
181
|
+
"min" : 0,
|
182
|
+
"max" : 0,
|
183
|
+
"average" : 0
|
184
|
+
},
|
185
|
+
"length" : 3600000,
|
186
|
+
"projectname" : "Azkaban_Scheduler_Test",
|
187
|
+
"period" : 21600000,
|
188
|
+
"flowname" : "first"
|
189
|
+
} ]
|
190
|
+
}
|
191
|
+
http_version:
|
192
|
+
recorded_at: Mon, 15 Sep 2014 17:55:54 GMT
|
193
|
+
- request:
|
194
|
+
method: post
|
195
|
+
uri: <URL>/schedule
|
196
|
+
body:
|
197
|
+
encoding: US-ASCII
|
198
|
+
string: ajax=loadFlow
|
199
|
+
headers:
|
200
|
+
Accept:
|
201
|
+
- application/json
|
202
|
+
User-Agent:
|
203
|
+
- Ruby
|
204
|
+
Content-Type:
|
205
|
+
- application/x-www-form-urlencoded
|
206
|
+
Cookie:
|
207
|
+
- azkaban.browser.session.id=bf83e117-1705-4a13-80e0-435a6f41a92a
|
208
|
+
response:
|
209
|
+
status:
|
210
|
+
code: 200
|
211
|
+
message: OK
|
212
|
+
headers:
|
213
|
+
Server:
|
214
|
+
- nginx
|
215
|
+
Date:
|
216
|
+
- Mon, 15 Sep 2014 17:55:54 GMT
|
217
|
+
Content-Type:
|
218
|
+
- application/json
|
219
|
+
Transfer-Encoding:
|
220
|
+
- chunked
|
221
|
+
Connection:
|
222
|
+
- close
|
223
|
+
Vary:
|
224
|
+
- Accept-Encoding
|
225
|
+
P3p:
|
226
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
227
|
+
body:
|
228
|
+
encoding: US-ASCII
|
229
|
+
string: |-
|
230
|
+
{
|
231
|
+
"items" : [ {
|
232
|
+
"history" : false,
|
233
|
+
"time" : 1410384900000,
|
234
|
+
"scheduleid" : 2200,
|
235
|
+
"stats" : {
|
236
|
+
"min" : 0,
|
237
|
+
"max" : 0,
|
238
|
+
"average" : 0
|
239
|
+
},
|
240
|
+
"length" : 3600000,
|
241
|
+
"projectname" : "Azkaban_Scheduler_Test",
|
242
|
+
"period" : 21600000,
|
243
|
+
"flowname" : "first"
|
244
|
+
} ]
|
245
|
+
}
|
246
|
+
http_version:
|
247
|
+
recorded_at: Mon, 15 Sep 2014 17:55:54 GMT
|
248
|
+
- request:
|
249
|
+
method: post
|
250
|
+
uri: <URL>/schedule
|
251
|
+
body:
|
252
|
+
encoding: US-ASCII
|
253
|
+
string: action=removeSched&scheduleId=2200
|
254
|
+
headers:
|
255
|
+
Accept:
|
256
|
+
- application/json
|
257
|
+
User-Agent:
|
258
|
+
- Ruby
|
259
|
+
Content-Type:
|
260
|
+
- application/x-www-form-urlencoded
|
261
|
+
Cookie:
|
262
|
+
- azkaban.browser.session.id=bf83e117-1705-4a13-80e0-435a6f41a92a
|
263
|
+
response:
|
264
|
+
status:
|
265
|
+
code: 200
|
266
|
+
message: OK
|
267
|
+
headers:
|
268
|
+
Server:
|
269
|
+
- nginx
|
270
|
+
Date:
|
271
|
+
- Mon, 15 Sep 2014 17:55:54 GMT
|
272
|
+
Content-Type:
|
273
|
+
- application/json
|
274
|
+
Transfer-Encoding:
|
275
|
+
- chunked
|
276
|
+
Connection:
|
277
|
+
- close
|
278
|
+
Vary:
|
279
|
+
- Accept-Encoding
|
280
|
+
Expires:
|
281
|
+
- Thu, 01-Jan-1970 00:00:00 GMT
|
282
|
+
Set-Cookie:
|
283
|
+
- azkaban.success.message="flow first removed from Schedules.";Path=/
|
284
|
+
P3p:
|
285
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
286
|
+
body:
|
287
|
+
encoding: US-ASCII
|
288
|
+
string: |-
|
289
|
+
{
|
290
|
+
"message" : "flow first removed from Schedules.",
|
291
|
+
"status" : "success"
|
292
|
+
}
|
293
|
+
http_version:
|
294
|
+
recorded_at: Mon, 15 Sep 2014 17:55:54 GMT
|
295
|
+
- request:
|
296
|
+
method: get
|
297
|
+
uri: <URL>/manager?delete=true&project=Azkaban_Scheduler_Test&session.id=bf83e117-1705-4a13-80e0-435a6f41a92a
|
298
|
+
body:
|
299
|
+
encoding: US-ASCII
|
300
|
+
string: ''
|
301
|
+
headers:
|
302
|
+
Accept:
|
303
|
+
- application/json
|
304
|
+
User-Agent:
|
305
|
+
- Ruby
|
306
|
+
response:
|
307
|
+
status:
|
308
|
+
code: 302
|
309
|
+
message: Found
|
310
|
+
headers:
|
311
|
+
Server:
|
312
|
+
- nginx
|
313
|
+
Date:
|
314
|
+
- Mon, 15 Sep 2014 17:55:55 GMT
|
315
|
+
Transfer-Encoding:
|
316
|
+
- chunked
|
317
|
+
Connection:
|
318
|
+
- close
|
319
|
+
Expires:
|
320
|
+
- Thu, 01-Jan-1970 00:00:00 GMT
|
321
|
+
Set-Cookie:
|
322
|
+
- azkaban.success.message="Project 'Azkaban_Scheduler_Test' was successfully deleted.";Path=/
|
323
|
+
Location:
|
324
|
+
- <HTTP_URL>/
|
325
|
+
P3p:
|
326
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
327
|
+
body:
|
328
|
+
encoding: US-ASCII
|
329
|
+
string: ''
|
330
|
+
http_version:
|
331
|
+
recorded_at: Mon, 15 Sep 2014 17:55:55 GMT
|
332
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: <URL>/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: action=login&username=foo&password=bar
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Mon, 15 Sep 2014 17:55:53 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
P3p:
|
34
|
+
- CP="NOI DSP COR NID ADMa OPTa OUR NOR"
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: |-
|
38
|
+
{
|
39
|
+
"error" : "Incorrect Login. Username/Password not found."
|
40
|
+
}
|
41
|
+
http_version:
|
42
|
+
recorded_at: Mon, 15 Sep 2014 17:55:53 GMT
|
43
|
+
recorded_with: VCR 2.9.0
|