beanstalk_integration_tests 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/Gemfile +3 -0
- data/LICENSE +22 -0
- data/README.md +38 -0
- data/Rakefile +9 -0
- data/beanstalk_integration_tests.gemspec +26 -0
- data/lib/beanstalk_integration_tests.rb +2 -0
- data/lib/beanstalk_integration_tests/bury_test.rb +137 -0
- data/lib/beanstalk_integration_tests/delete_test.rb +160 -0
- data/lib/beanstalk_integration_tests/ignore_test.rb +127 -0
- data/lib/beanstalk_integration_tests/kick_job_test.rb +68 -0
- data/lib/beanstalk_integration_tests/kick_test.rb +207 -0
- data/lib/beanstalk_integration_tests/list_tube_used_test.rb +26 -0
- data/lib/beanstalk_integration_tests/list_tubes_test.rb +26 -0
- data/lib/beanstalk_integration_tests/list_tubes_watched_test.rb +26 -0
- data/lib/beanstalk_integration_tests/pause_tube_test.rb +166 -0
- data/lib/beanstalk_integration_tests/peek_test.rb +242 -0
- data/lib/beanstalk_integration_tests/put_test.rb +255 -0
- data/lib/beanstalk_integration_tests/quit_test.rb +24 -0
- data/lib/beanstalk_integration_tests/release_test.rb +191 -0
- data/lib/beanstalk_integration_tests/reserve_test.rb +385 -0
- data/lib/beanstalk_integration_tests/stats_job_test.rb +116 -0
- data/lib/beanstalk_integration_tests/stats_test.rb +130 -0
- data/lib/beanstalk_integration_tests/stats_tube_test.rb +141 -0
- data/lib/beanstalk_integration_tests/test_helper.rb +88 -0
- data/lib/beanstalk_integration_tests/tests.rb +4 -0
- data/lib/beanstalk_integration_tests/touch_test.rb +118 -0
- data/lib/beanstalk_integration_tests/use_test.rb +118 -0
- data/lib/beanstalk_integration_tests/version.rb +3 -0
- data/lib/beanstalk_integration_tests/watch_test.rb +128 -0
- metadata +157 -0
@@ -0,0 +1,118 @@
|
|
1
|
+
require 'beanstalk_integration_tests/test_helper'
|
2
|
+
|
3
|
+
class TouchTest < BeanstalkIntegrationTest
|
4
|
+
|
5
|
+
context 'touch with reserved job' do
|
6
|
+
|
7
|
+
should 'reset job time-left to job ttr' do
|
8
|
+
initial_cmd_touch = client.transmit('stats')[:body]['cmd-touch']
|
9
|
+
do_setup(5)
|
10
|
+
sleep 1
|
11
|
+
assert_equal(@ttr - 2, client.transmit("stats-job #{@reserved_id}")[:body]['time-left'])
|
12
|
+
client.transmit("touch #{@reserved_id}")
|
13
|
+
assert_equal(@ttr - 1, client.transmit("stats-job #{@reserved_id}")[:body]['time-left'])
|
14
|
+
assert_equal(initial_cmd_touch + 1, client.transmit('stats')[:body]['cmd-touch'], 'Expected cmd-touch to be incremented')
|
15
|
+
client.transmit("delete #{@reserved_id}")
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
should 'prevent timeout from occuring' do
|
20
|
+
initial_cmd_touch = client.transmit('stats')[:body]['cmd-touch']
|
21
|
+
do_setup(1)
|
22
|
+
# Allow initial timeout period to expire quickly
|
23
|
+
3.times do
|
24
|
+
sleep 0.5
|
25
|
+
client.transmit("touch #{@reserved_id}")
|
26
|
+
end
|
27
|
+
job_stats = client.transmit("stats-job #{@reserved_id}")[:body]
|
28
|
+
client.transmit("delete #{@reserved_id}")
|
29
|
+
assert_equal('reserved', job_stats['state'])
|
30
|
+
assert_equal(0, job_stats['timeouts'])
|
31
|
+
assert_equal(initial_cmd_touch + 3, client.transmit('stats')[:body]['cmd-touch'], 'Expected cmd-touch to be incremented')
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
should 'not allow touching jobs reserved by other clients' do
|
36
|
+
initial_cmd_touch = client.transmit('stats')[:body]['cmd-touch']
|
37
|
+
do_setup(10)
|
38
|
+
sleep 1
|
39
|
+
initial_time_left = client.transmit("stats-job #{@reserved_id}")[:body]['time-left']
|
40
|
+
assert_raises(Beaneater::NotFoundError, 'Expected touching a job reserved by another client to return NOT_FOUND') do
|
41
|
+
build_client.transmit("touch #{@reserved_id}")
|
42
|
+
end
|
43
|
+
assert(initial_time_left >= client.transmit("stats-job #{@reserved_id}")[:body]['time-left'], 'Expected time-left to be less after failed touch')
|
44
|
+
client.transmit("delete #{@reserved_id}")
|
45
|
+
assert_equal(initial_cmd_touch + 1, client.transmit('stats')[:body]['cmd-touch'], 'Expected cmd-touch to be incremented')
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
should 'not allow touching jobs that are not reserved' do
|
50
|
+
stats = client.transmit('stats')[:body]
|
51
|
+
initial_cmd_touch = stats['cmd-touch']
|
52
|
+
initial_job_timeouts = stats['job-timeouts']
|
53
|
+
do_setup(1)
|
54
|
+
sleep 1
|
55
|
+
assert_raises(Beaneater::NotFoundError, 'Expected touching an unreserved job to return NOT_FOUND') do
|
56
|
+
build_client.transmit("touch #{@reserved_id}")
|
57
|
+
end
|
58
|
+
assert_equal(1, client.transmit("stats-job #{@reserved_id}")[:body]['timeouts'], 'Expected job timeouts to be incremented')
|
59
|
+
client.transmit("delete #{@reserved_id}")
|
60
|
+
stats = client.transmit('stats')[:body]
|
61
|
+
assert_equal(initial_cmd_touch + 1, stats['cmd-touch'], 'Expected cmd-touch to be incremented')
|
62
|
+
assert_equal(initial_job_timeouts + 1, stats['job-timeouts'], 'Expected job-timeouts to be incremented')
|
63
|
+
end
|
64
|
+
|
65
|
+
|
66
|
+
should 'ignore trailing space, arguments, and chars' do
|
67
|
+
initial_cmd_touch = client.transmit('stats')[:body]['cmd-touch']
|
68
|
+
do_setup(10)
|
69
|
+
[' ', ' and ignore these arguments', '_and_ignore_these_letters'].each do |trailer|
|
70
|
+
sleep 1
|
71
|
+
time_left = client.transmit("stats-job #{@reserved_id}")[:body]['time-left']
|
72
|
+
client.transmit("touch #{@reserved_id}#{trailer}")
|
73
|
+
assert(client.transmit("stats-job #{@reserved_id}")[:body]['time-left'] > time_left, 'Expected time-left to be greater after touch')
|
74
|
+
end
|
75
|
+
client.transmit("delete #{@reserved_id}")
|
76
|
+
assert_equal(initial_cmd_touch + 3, client.transmit('stats')[:body]['cmd-touch'], 'Expected cmd-touch to be incremented')
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
context 'touch not requiring reserved job' do
|
83
|
+
|
84
|
+
should 'return UNKNOWN_COMMAND if no space after command' do
|
85
|
+
initial_cmd_touch = client.transmit('stats')[:body]['cmd-touch']
|
86
|
+
assert_raises(Beaneater::UnknownCommandError, 'Expected touch with no following space to return UNKNOWN_COMMAND') do
|
87
|
+
build_client.transmit('touch')
|
88
|
+
end
|
89
|
+
assert_equal(initial_cmd_touch, client.transmit('stats')[:body]['cmd-touch'], 'Expected cmd-touch to be unchanged')
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
should 'return NOT_FOUND if non-integer or null job_id provided' do
|
94
|
+
initial_cmd_touch = client.transmit('stats')[:body]['cmd-touch']
|
95
|
+
assert_raises(Beaneater::NotFoundError, 'Expected touch with no job_id to return NOT_FOUND') do
|
96
|
+
build_client.transmit('touch ')
|
97
|
+
end
|
98
|
+
assert_equal(initial_cmd_touch + 1, client.transmit('stats')[:body]['cmd-touch'], 'Expected cmd-touch to be incremented')
|
99
|
+
assert_raises(Beaneater::NotFoundError, 'Expected touch with no job_id to return NOT_FOUND') do
|
100
|
+
build_client.transmit('touch x')
|
101
|
+
end
|
102
|
+
assert_equal(initial_cmd_touch + 2, client.transmit('stats')[:body]['cmd-touch'], 'Expected cmd-touch to be incremented')
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
def do_setup(ttr = 5)
|
108
|
+
message = uuid
|
109
|
+
@ttr = ttr
|
110
|
+
client.transmit("watch #{tube_name}")
|
111
|
+
client.transmit("use #{tube_name}")
|
112
|
+
client.transmit("put 0 0 #{@ttr} #{message.bytesize}\r\n#{message}")
|
113
|
+
timeout(1) do
|
114
|
+
@reserved_id = client.transmit('reserve')[:id]
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
require 'beanstalk_integration_tests/test_helper'
|
2
|
+
|
3
|
+
class UseTest < BeanstalkIntegrationTest
|
4
|
+
|
5
|
+
context 'use' do
|
6
|
+
|
7
|
+
should 'use the default tube by default' do
|
8
|
+
assert_equal 'default', client.transmit('list-tube-used')[:id]
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
should 'create and use the tube supplied' do
|
13
|
+
response = client.transmit("use #{tube_name}")
|
14
|
+
assert_equal 'USING', response[:status]
|
15
|
+
assert_equal tube_name, response[:id]
|
16
|
+
assert_equal(tube_name, client.transmit('list-tube-used')[:id], 'Expected list-tube-used to match used tube name')
|
17
|
+
assert(client.transmit('list-tubes')[:body].include?(tube_name), 'Expected used tube to be included in list-tubes')
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
should 'increment/decrement the current-using counter on the tube stats' do
|
22
|
+
client.transmit("use #{tube_name}")
|
23
|
+
initial_using_count = client.transmit("stats-tube #{tube_name}")[:body]['current-using'].to_i
|
24
|
+
assert_equal 1, initial_using_count
|
25
|
+
other_client = build_client
|
26
|
+
other_client.transmit("use #{tube_name}")
|
27
|
+
assert_equal initial_using_count + 1, client.transmit("stats-tube #{tube_name}")[:body]['current-using'].to_i
|
28
|
+
other_client.transmit("use #{uuid}")
|
29
|
+
assert_equal initial_using_count, client.transmit("stats-tube #{tube_name}")[:body]['current-using'].to_i
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
should 'increment the current-tubes and cmd-use counters on the server stats' do
|
34
|
+
stats = client.transmit('stats')[:body]
|
35
|
+
initial_use_count = stats['cmd-use'].to_i
|
36
|
+
initial_tube_count = stats['current-tubes'].to_i
|
37
|
+
client.transmit("use #{tube_name}")
|
38
|
+
stats = client.transmit('stats')[:body]
|
39
|
+
assert_equal initial_use_count + 1, stats['cmd-use'].to_i
|
40
|
+
assert_equal initial_tube_count + 1, stats['current-tubes'].to_i
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
should 'be able to handle tube name of maximum length' do
|
45
|
+
name = 'x' * 200
|
46
|
+
response = client.transmit("use #{name}")
|
47
|
+
assert_equal 'USING', response[:status]
|
48
|
+
assert_equal name, response[:id]
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
should 'return BAD_FORMAT if tube name > 200 bytes' do
|
53
|
+
initital_cmd_use = client.transmit('stats')[:body]['cmd-use']
|
54
|
+
assert_raises Beaneater::BadFormatError do
|
55
|
+
client.transmit("use #{'x' * 201}")
|
56
|
+
end
|
57
|
+
assert_equal(initital_cmd_use, client.transmit('stats')[:body]['cmd-use'], 'Expected cmd-use to be unchanged')
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
should 'return BAD_FORMAT if line has a trailing space' do
|
62
|
+
initital_cmd_use = client.transmit('stats')[:body]['cmd-use']
|
63
|
+
assert_raises Beaneater::BadFormatError do
|
64
|
+
client.transmit("use #{tube_name} ")
|
65
|
+
end
|
66
|
+
assert_equal(initital_cmd_use, client.transmit('stats')[:body]['cmd-use'], 'Expected cmd-use to be unchanged')
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
should 'return BAD_FORMAT if tube name includes invalid characters or starts with hyphen' do
|
71
|
+
initital_cmd_use = client.transmit('stats')[:body]['cmd-use']
|
72
|
+
valid_chars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a + %w[- + / ; . $ _ ( )] + [' ']
|
73
|
+
# Beanstalk hangs on char 13
|
74
|
+
bad_chars = (0..12).to_a.concat((14..255).to_a).to_a.map!(&:chr) - valid_chars
|
75
|
+
|
76
|
+
assert_raises(Beaneater::BadFormatError, 'Expected tube name starting with hyphen to be invalid') do
|
77
|
+
client.transmit('use -starts-with-hyphen')
|
78
|
+
end
|
79
|
+
assert_equal(initital_cmd_use, client.transmit('stats')[:body]['cmd-use'], 'Expected cmd-use to be unchanged')
|
80
|
+
|
81
|
+
bad_chars.each do |bad_char|
|
82
|
+
assert_raises(Beaneater::BadFormatError, "Expected tube name with char #{bad_char} to be invalid") do
|
83
|
+
client.transmit("use name_with_#{bad_char}_in_it")
|
84
|
+
end
|
85
|
+
end
|
86
|
+
assert_equal(initital_cmd_use, client.transmit('stats')[:body]['cmd-use'], 'Expected cmd-use to be unchanged')
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
should 'delete tubes that are not watched and are no longer used' do
|
91
|
+
client.transmit("use #{tube_name}")
|
92
|
+
tube_stats = client.transmit("stats-tube #{tube_name}")
|
93
|
+
assert_equal 1, tube_stats[:body]['current-using']
|
94
|
+
assert_equal 0, tube_stats[:body]['current-watching']
|
95
|
+
client.transmit("use #{generate_tube_name}")
|
96
|
+
assert_raises(Beaneater::NotFoundError, 'Expected unused tube to be deleted') do
|
97
|
+
client.transmit("stats-tube #{tube_name}")
|
98
|
+
end
|
99
|
+
refute(client.transmit('list-tubes')[:body].include?(tube_name), 'Expected unused tube to not be included in list-tubes')
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
should 'delete tubes that are not watched and are no longer used even if paused' do
|
104
|
+
client.transmit("use #{tube_name}")
|
105
|
+
tube_stats = client.transmit("stats-tube #{tube_name}")
|
106
|
+
assert_equal 1, tube_stats[:body]['current-using']
|
107
|
+
assert_equal 0, tube_stats[:body]['current-watching']
|
108
|
+
client.transmit("pause-tube #{tube_name} 120")
|
109
|
+
client.transmit("use #{generate_tube_name}")
|
110
|
+
assert_raises(Beaneater::NotFoundError, 'Expected unused tube to be deleted') do
|
111
|
+
client.transmit("stats-tube #{tube_name}")
|
112
|
+
end
|
113
|
+
refute(client.transmit('list-tubes')[:body].include?(tube_name), 'Expected unused tube to not be included in list-tubes')
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
require 'beanstalk_integration_tests/test_helper'
|
2
|
+
|
3
|
+
class WatchTest < BeanstalkIntegrationTest
|
4
|
+
|
5
|
+
context 'watch' do
|
6
|
+
|
7
|
+
should 'watch the default tube by default' do
|
8
|
+
assert client.transmit('list-tubes-watched')[:body].include?('default')
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
should 'create and watch the tube supplied and return the incremented count of tubes watched' do
|
13
|
+
assert_equal 1, client.transmit('list-tubes-watched')[:body].length
|
14
|
+
response = client.transmit("watch #{tube_name}")
|
15
|
+
assert_equal 'WATCHING', response[:status]
|
16
|
+
tubes_watched = client.transmit('list-tubes-watched')[:body]
|
17
|
+
assert_equal tubes_watched.length, response[:id].to_i
|
18
|
+
assert tubes_watched.include?(tube_name)
|
19
|
+
assert(client.transmit('list-tubes-watched')[:body].include?(tube_name), 'Expected watched tube to be included in list-tubes-watched')
|
20
|
+
assert(client.transmit('list-tubes')[:body].include?(tube_name), 'Expected watched tube to be included in list-tubes')
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
should 'increment the number of watchers on the tubes stats' do
|
25
|
+
client.transmit("watch #{tube_name}")
|
26
|
+
assert_equal 1, client.transmit("stats-tube #{tube_name}")[:body]['current-watching']
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
should 'increment the current-tubes and cmd-watch counters on the server stats' do
|
31
|
+
stats = client.transmit('stats')[:body]
|
32
|
+
initial_use_count = stats['cmd-watch'].to_i
|
33
|
+
initial_tube_count = stats['current-tubes'].to_i
|
34
|
+
client.transmit("watch #{tube_name}")
|
35
|
+
stats = client.transmit('stats')[:body]
|
36
|
+
assert_equal initial_use_count + 1, stats['cmd-watch'].to_i
|
37
|
+
assert_equal initial_tube_count + 1, stats['current-tubes'].to_i
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
should 'not increment count of tubes watched if tube already watched' do
|
42
|
+
initial_cmd_watch = client.transmit('stats')[:body]['cmd-watch']
|
43
|
+
assert_equal 1, client.transmit('list-tubes-watched')[:body].length
|
44
|
+
response = client.transmit("watch #{tube_name}")
|
45
|
+
assert_equal 2, client.transmit('list-tubes-watched')[:body].length
|
46
|
+
response = client.transmit("watch #{tube_name}")
|
47
|
+
assert_equal 2, client.transmit('list-tubes-watched')[:body].length
|
48
|
+
assert_equal(initial_cmd_watch + 2, client.transmit('stats')[:body]['cmd-watch'], 'Expected cmd-watch to be incremented')
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
should 'return BAD_FORMAT if line has a trailing space' do
|
53
|
+
initital_cmd_use = client.transmit('stats')[:body]['cmd-watch']
|
54
|
+
assert_raises Beaneater::BadFormatError do
|
55
|
+
client.transmit("watch #{tube_name} ")
|
56
|
+
end
|
57
|
+
assert_equal(initital_cmd_use, client.transmit('stats')[:body]['cmd-watch'], 'Expected cmd-watch to be unchanged')
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
should 'be able to handle tube name of maximum length' do
|
62
|
+
response = client.transmit("watch #{'x' * 200}")
|
63
|
+
assert_equal 'WATCHING', response[:status]
|
64
|
+
assert_equal '2', response[:id]
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
should 'return BAD_FORMAT if tube name > 200 bytes' do
|
69
|
+
initial_cmd_watch = client.transmit('stats')[:body]['cmd-watch']
|
70
|
+
assert_raises Beaneater::BadFormatError do
|
71
|
+
client.transmit("watch #{'x' * 201}")
|
72
|
+
end
|
73
|
+
# Extra long command leaves client in weird place
|
74
|
+
assert_equal(initial_cmd_watch, build_client.transmit('stats')[:body]['cmd-watch'], 'Expected cmd-watch to remain unchanged')
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
should 'return BAD_FORMAT if tube name includes invalid characters or starts with hyphen' do
|
79
|
+
initial_cmd_watch = client.transmit('stats')[:body]['cmd-watch']
|
80
|
+
valid_chars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a + %w[- + / ; . $ _ ( )] + [' ']
|
81
|
+
# Beanstalk hangs on char 13
|
82
|
+
bad_chars = (0..12).to_a.concat((14..255).to_a).to_a.map!(&:chr) - valid_chars
|
83
|
+
|
84
|
+
assert_raises(Beaneater::BadFormatError, 'Expected tube name starting with hyphen to be invalid') do
|
85
|
+
client.transmit('watch -starts-with-hyphen')
|
86
|
+
end
|
87
|
+
assert_equal(initial_cmd_watch, client.transmit('stats')[:body]['cmd-watch'], 'Expected cmd-watch to remain unchanged')
|
88
|
+
|
89
|
+
bad_chars.each do |bad_char|
|
90
|
+
assert_raises(Beaneater::BadFormatError, "Expected tube name with char #{bad_char} to be invalid") do
|
91
|
+
client.transmit("watch name_with_#{bad_char}_in_it")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
assert_equal(initial_cmd_watch, client.transmit('stats')[:body]['cmd-watch'], 'Expected cmd-watch to remain unchanged')
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
should 'delete tubes that are not being used and are no longer watched' do
|
99
|
+
client.transmit("watch #{tube_name}")
|
100
|
+
tube_stats = client.transmit("stats-tube #{tube_name}")
|
101
|
+
assert_equal 1, tube_stats[:body]['current-watching']
|
102
|
+
assert_equal 0, tube_stats[:body]['current-using']
|
103
|
+
client.transmit("watch #{generate_tube_name}")
|
104
|
+
client.transmit("ignore #{tube_name}")
|
105
|
+
assert_raises(Beaneater::NotFoundError, 'Expected unwatched tube to be deleted') do
|
106
|
+
client.transmit("stats-tube #{tube_name}")
|
107
|
+
end
|
108
|
+
refute(client.transmit('list-tubes')[:body].include?(tube_name), 'Expected unwatched tube to not be included in list-tubes')
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
should 'delete tubes that are not being used and are no longer watched even if paused' do
|
113
|
+
client.transmit("watch #{tube_name}")
|
114
|
+
tube_stats = client.transmit("stats-tube #{tube_name}")
|
115
|
+
assert_equal 1, tube_stats[:body]['current-watching']
|
116
|
+
assert_equal 0, tube_stats[:body]['current-using']
|
117
|
+
client.transmit("watch #{generate_tube_name}")
|
118
|
+
client.transmit("pause-tube #{tube_name} 120")
|
119
|
+
client.transmit("ignore #{tube_name}")
|
120
|
+
assert_raises(Beaneater::NotFoundError, 'Expected unwatched tube to be deleted') do
|
121
|
+
client.transmit("stats-tube #{tube_name}")
|
122
|
+
end
|
123
|
+
refute(client.transmit('list-tubes')[:body].include?(tube_name), 'Expected unwatched tube to not be included in list-tubes')
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
metadata
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: beanstalk_integration_tests
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Danny Guinther
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: beaneater
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: minitest_should
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: mocha
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
description: Integration tests for testing adherence to the beanstalkd protocol
|
95
|
+
email:
|
96
|
+
- dannyguinther@gmail.com
|
97
|
+
executables: []
|
98
|
+
extensions: []
|
99
|
+
extra_rdoc_files: []
|
100
|
+
files:
|
101
|
+
- .gitignore
|
102
|
+
- Gemfile
|
103
|
+
- LICENSE
|
104
|
+
- README.md
|
105
|
+
- Rakefile
|
106
|
+
- beanstalk_integration_tests.gemspec
|
107
|
+
- lib/beanstalk_integration_tests.rb
|
108
|
+
- lib/beanstalk_integration_tests/bury_test.rb
|
109
|
+
- lib/beanstalk_integration_tests/delete_test.rb
|
110
|
+
- lib/beanstalk_integration_tests/ignore_test.rb
|
111
|
+
- lib/beanstalk_integration_tests/kick_job_test.rb
|
112
|
+
- lib/beanstalk_integration_tests/kick_test.rb
|
113
|
+
- lib/beanstalk_integration_tests/list_tube_used_test.rb
|
114
|
+
- lib/beanstalk_integration_tests/list_tubes_test.rb
|
115
|
+
- lib/beanstalk_integration_tests/list_tubes_watched_test.rb
|
116
|
+
- lib/beanstalk_integration_tests/pause_tube_test.rb
|
117
|
+
- lib/beanstalk_integration_tests/peek_test.rb
|
118
|
+
- lib/beanstalk_integration_tests/put_test.rb
|
119
|
+
- lib/beanstalk_integration_tests/quit_test.rb
|
120
|
+
- lib/beanstalk_integration_tests/release_test.rb
|
121
|
+
- lib/beanstalk_integration_tests/reserve_test.rb
|
122
|
+
- lib/beanstalk_integration_tests/stats_job_test.rb
|
123
|
+
- lib/beanstalk_integration_tests/stats_test.rb
|
124
|
+
- lib/beanstalk_integration_tests/stats_tube_test.rb
|
125
|
+
- lib/beanstalk_integration_tests/test_helper.rb
|
126
|
+
- lib/beanstalk_integration_tests/tests.rb
|
127
|
+
- lib/beanstalk_integration_tests/touch_test.rb
|
128
|
+
- lib/beanstalk_integration_tests/use_test.rb
|
129
|
+
- lib/beanstalk_integration_tests/version.rb
|
130
|
+
- lib/beanstalk_integration_tests/watch_test.rb
|
131
|
+
homepage: ''
|
132
|
+
licenses:
|
133
|
+
- MIT
|
134
|
+
post_install_message:
|
135
|
+
rdoc_options: []
|
136
|
+
require_paths:
|
137
|
+
- lib
|
138
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
requirements: []
|
151
|
+
rubyforge_project:
|
152
|
+
rubygems_version: 1.8.25
|
153
|
+
signing_key:
|
154
|
+
specification_version: 3
|
155
|
+
summary: Beanstalk protocol integration tests
|
156
|
+
test_files: []
|
157
|
+
has_rdoc:
|