karafka-testing 1.4.2 → 1.4.3
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 +0 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +40 -42
- data/README.md +5 -13
- data/certs/mensfeld.pem +21 -21
- data/lib/karafka/testing/dummy_client.rb +19 -0
- data/lib/karafka/testing/rspec/helpers.rb +3 -0
- data/lib/karafka/testing/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +25 -25
- metadata.gz.sig +0 -0
- data/.github/FUNDING.yml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f63700b0790ff4e25b9c25c4e199e573b896d3248a058d2d80a2d4175617243
|
4
|
+
data.tar.gz: 26c8ce527f9b98148edcb723bb4c700ce1c808727efbaa6ebcb509c2b6a2157b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1ede09271a0c76a8733a07fab3797099955c8cbc9f503f52b5e52cb0cac8c0925da9dcf406ffb86363dde9be5f4b6d2706c1bf144433e2d9c91c63affc0a516
|
7
|
+
data.tar.gz: fa13464d737c9f16bf139a7555076e1ed7234860c161d5e124e51f8eea9ee4f0b336855a93efe24cbab180c4f56c2e4f05bb818ab633b3d46a4e40b3af7e8bdc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Karafka Test gem changelog
|
2
2
|
|
3
|
+
## 1.4.3 (2021-11-27)
|
4
|
+
- #71 - `mark_as_consumed!` is not stubbed, causing `Karafka::Errors::MissingClientError`
|
5
|
+
|
3
6
|
## 1.4.2 (2021-04-21)
|
4
7
|
- Restore MIT license
|
5
8
|
- Remove Ruby 2.5 support and update minimum Ruby requirement to 2.6
|
data/Gemfile.lock
CHANGED
@@ -1,42 +1,41 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka-testing (1.4.
|
4
|
+
karafka-testing (1.4.3)
|
5
5
|
karafka (~> 1.4.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
concurrent-ruby (1.1.
|
10
|
+
concurrent-ruby (1.1.9)
|
11
11
|
delivery_boy (1.1.0)
|
12
12
|
king_konf (~> 1.0)
|
13
13
|
ruby-kafka (~> 1.0)
|
14
|
-
digest-crc (0.6.
|
14
|
+
digest-crc (0.6.4)
|
15
15
|
rake (>= 12.0.0, < 14.0.0)
|
16
|
-
dry-configurable (0.
|
16
|
+
dry-configurable (0.13.0)
|
17
17
|
concurrent-ruby (~> 1.0)
|
18
|
-
dry-core (~> 0.
|
19
|
-
dry-container (0.
|
18
|
+
dry-core (~> 0.6)
|
19
|
+
dry-container (0.9.0)
|
20
20
|
concurrent-ruby (~> 1.0)
|
21
|
-
dry-configurable (~> 0.
|
22
|
-
dry-core (0.
|
21
|
+
dry-configurable (~> 0.13, >= 0.13.0)
|
22
|
+
dry-core (0.7.1)
|
23
23
|
concurrent-ruby (~> 1.0)
|
24
|
-
dry-equalizer (0.3.0)
|
25
24
|
dry-events (0.3.0)
|
26
25
|
concurrent-ruby (~> 1.0)
|
27
26
|
dry-core (~> 0.5, >= 0.5)
|
28
|
-
dry-inflector (0.2.
|
27
|
+
dry-inflector (0.2.1)
|
29
28
|
dry-initializer (3.0.4)
|
30
|
-
dry-logic (1.
|
29
|
+
dry-logic (1.2.0)
|
31
30
|
concurrent-ruby (~> 1.0)
|
32
31
|
dry-core (~> 0.5, >= 0.5)
|
33
|
-
dry-monitor (0.
|
34
|
-
dry-configurable (~> 0.
|
32
|
+
dry-monitor (0.5.0)
|
33
|
+
dry-configurable (~> 0.13, >= 0.13.0)
|
35
34
|
dry-core (~> 0.5, >= 0.5)
|
36
35
|
dry-events (~> 0.2)
|
37
|
-
dry-schema (1.
|
36
|
+
dry-schema (1.8.0)
|
38
37
|
concurrent-ruby (~> 1.0)
|
39
|
-
dry-configurable (~> 0.
|
38
|
+
dry-configurable (~> 0.13, >= 0.13.0)
|
40
39
|
dry-core (~> 0.5, >= 0.5)
|
41
40
|
dry-initializer (~> 3.0)
|
42
41
|
dry-logic (~> 1.0)
|
@@ -47,44 +46,43 @@ GEM
|
|
47
46
|
dry-core (~> 0.5, >= 0.5)
|
48
47
|
dry-inflector (~> 0.1, >= 0.1.2)
|
49
48
|
dry-logic (~> 1.0, >= 1.0.2)
|
50
|
-
dry-validation (1.
|
49
|
+
dry-validation (1.7.0)
|
51
50
|
concurrent-ruby (~> 1.0)
|
52
51
|
dry-container (~> 0.7, >= 0.7.1)
|
53
|
-
dry-core (~> 0.
|
54
|
-
dry-equalizer (~> 0.2)
|
52
|
+
dry-core (~> 0.5, >= 0.5)
|
55
53
|
dry-initializer (~> 3.0)
|
56
|
-
dry-schema (~> 1.
|
54
|
+
dry-schema (~> 1.8, >= 1.8.0)
|
57
55
|
envlogic (1.1.3)
|
58
56
|
dry-inflector (~> 0.1)
|
59
57
|
io-console (0.5.9)
|
60
|
-
irb (1.3.
|
61
|
-
reline (>= 0.
|
62
|
-
karafka (1.4.
|
63
|
-
dry-configurable (~> 0.
|
64
|
-
dry-inflector (~> 0.
|
65
|
-
dry-monitor (~> 0.
|
66
|
-
dry-validation (~> 1.
|
58
|
+
irb (1.3.7)
|
59
|
+
reline (>= 0.2.7)
|
60
|
+
karafka (1.4.10)
|
61
|
+
dry-configurable (~> 0.13)
|
62
|
+
dry-inflector (~> 0.2)
|
63
|
+
dry-monitor (~> 0.5)
|
64
|
+
dry-validation (~> 1.7)
|
67
65
|
envlogic (~> 1.1)
|
68
|
-
irb (~> 1.
|
69
|
-
ruby-kafka (>= 1.
|
70
|
-
thor (>=
|
71
|
-
waterdrop (~> 1.4
|
72
|
-
zeitwerk (~> 2.
|
66
|
+
irb (~> 1.3)
|
67
|
+
ruby-kafka (>= 1.3.0)
|
68
|
+
thor (>= 1.1)
|
69
|
+
waterdrop (~> 1.4)
|
70
|
+
zeitwerk (~> 2.4)
|
73
71
|
king_konf (1.0.0)
|
74
|
-
rake (13.0.
|
75
|
-
reline (0.2.
|
72
|
+
rake (13.0.6)
|
73
|
+
reline (0.2.7)
|
76
74
|
io-console (~> 0.5)
|
77
|
-
ruby-kafka (1.
|
75
|
+
ruby-kafka (1.4.0)
|
78
76
|
digest-crc
|
79
77
|
thor (1.1.0)
|
80
|
-
waterdrop (1.4.
|
78
|
+
waterdrop (1.4.4)
|
81
79
|
delivery_boy (>= 0.2, < 2.x)
|
82
|
-
dry-configurable (~> 0.
|
83
|
-
dry-monitor (~> 0.
|
84
|
-
dry-validation (~> 1.
|
85
|
-
ruby-kafka (>=
|
86
|
-
zeitwerk (~> 2.
|
87
|
-
zeitwerk (2.
|
80
|
+
dry-configurable (~> 0.13)
|
81
|
+
dry-monitor (~> 0.5)
|
82
|
+
dry-validation (~> 1.7)
|
83
|
+
ruby-kafka (>= 1.3.0)
|
84
|
+
zeitwerk (~> 2.4)
|
85
|
+
zeitwerk (2.5.1)
|
88
86
|
|
89
87
|
PLATFORMS
|
90
88
|
x86_64-linux
|
@@ -93,4 +91,4 @@ DEPENDENCIES
|
|
93
91
|
karafka-testing!
|
94
92
|
|
95
93
|
BUNDLED WITH
|
96
|
-
2.2.
|
94
|
+
2.2.30
|
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://github.com/karafka/testing/workflows/ci/badge.svg)](https://github.com/karafka/testing/actions?query=workflow%3Aci)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/karafka-testing.svg)](http://badge.fury.io/rb/karafka-testing)
|
5
|
-
[![Join the chat at https://
|
5
|
+
[![Join the chat at https://slack.karafka.io](https://raw.githubusercontent.com/karafka/misc/master/slack.svg)](https://slack.karafka.io)
|
6
6
|
|
7
|
-
Karafka-Testing is a library that provides
|
7
|
+
Karafka-Testing is a library that provides RSpec helpers, to make testing of Karafka consumers much easier.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -60,18 +60,10 @@ RSpec.describe InlineBatchConsumer do
|
|
60
60
|
end
|
61
61
|
```
|
62
62
|
|
63
|
-
## References
|
64
|
-
|
65
|
-
* [Karafka framework](https://github.com/karafka/karafka)
|
66
|
-
* [Karafka Testing Actions CI](https://github.com/karafka/testing/actions?query=workflow%3Aci)
|
67
|
-
* [Karafka Testing Coditsu](https://app.coditsu.io/karafka/repositories/testing)
|
68
|
-
|
69
63
|
## Note on contributions
|
70
64
|
|
71
|
-
First, thank you for considering contributing to Karafka
|
72
|
-
|
73
|
-
Each pull request must pass all the RSpec specs and meet our quality requirements.
|
65
|
+
First, thank you for considering contributing to the Karafka ecosystem! It's people like you that make the open source community such a great community!
|
74
66
|
|
75
|
-
|
67
|
+
Each pull request must pass all the RSpec specs, integration tests and meet our quality requirements.
|
76
68
|
|
77
|
-
|
69
|
+
Fork it, update and wait for the Github Actions results.
|
data/certs/mensfeld.pem
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjEwODExMTQxNTEzWhcNMjIwODExMTQx
|
4
|
+
NTEzWjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
|
5
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKA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8V9B/Yri2OGELBz8ykl7BsXUgNoUPA/4pHF6YRLz+VirOaUIQ4JfY7xGj6fSOWWz
|
20
|
+
/rQ/d77r6o1mfJYM/3BRVg73a3b7DmRnE5qjwmSaSQ7u802pJnLesmArch0xGCT/
|
21
|
+
fMmRli1Qb+6qOTl9mzD6UDMAyFR4t6MStLm0mIEqM0nBO5nUdUWbC7l9qXEf8XBE
|
22
|
+
2DP28p3EqSuS+lKbAWKcqv7t0iRhhmaod+Yn9mcrLN1sa3q3KSQ9BCyxezCD4Mk2
|
23
|
+
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
24
|
+
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
25
25
|
-----END CERTIFICATE-----
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Karafka
|
4
|
+
module Testing
|
5
|
+
# A dummy client that takes over client delegated methods from the consumers
|
6
|
+
# For specs we do not mark anything as consumed, nor do we really send heartbeats.
|
7
|
+
# Those things are tested in the framework itself
|
8
|
+
class DummyClient
|
9
|
+
%i[
|
10
|
+
mark_as_consumed
|
11
|
+
mark_as_consumed!
|
12
|
+
trigger_heartbeat
|
13
|
+
trigger_heartbeat!
|
14
|
+
].each do |caught_delegator|
|
15
|
+
define_method(caught_delegator) { |*| }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'karafka/testing/errors'
|
4
|
+
require 'karafka/testing/dummy_client'
|
4
5
|
|
5
6
|
module Karafka
|
6
7
|
module Testing
|
@@ -16,6 +17,8 @@ module Karafka
|
|
16
17
|
# This is an internal buffer for keeping "to be sent" messages before
|
17
18
|
# we run the consume
|
18
19
|
base.let(:_karafka_raw_data) { [] }
|
20
|
+
# Inject a dummy client that will intercept commands directed to the kafka client
|
21
|
+
base.before { Persistence::Client.write(DummyClient.new) }
|
19
22
|
# Clear the messages buffer after each spec, so nothing will leak
|
20
23
|
# in between them
|
21
24
|
base.after { _karafka_raw_data.clear }
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -11,30 +11,30 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
14
|
+
ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjEwODExMTQxNTEzWhcNMjIwODExMTQx
|
15
|
+
NTEzWjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
|
16
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDV2jKH4Ti87GM6nyT6D+ESzTI0MZDj
|
17
|
+
ak2/TEwnxvijMJyCCPKT/qIkbW4/f0VHM4rhPr1nW73sb5SZBVFCLlJcOSKOBdUY
|
18
|
+
TMY+SIXN2EtUaZuhAOe8LxtxjHTgRHvHcqUQMBENXTISNzCo32LnUxweu66ia4Pd
|
19
|
+
1mNRhzOqNv9YiBZvtBf7IMQ+sYdOCjboq2dlsWmJiwiDpY9lQBTnWORnT3mQxU5x
|
20
|
+
vPSwnLB854cHdCS8fQo4DjeJBRZHhEbcE5sqhEMB3RZA3EtFVEXOxlNxVTS3tnc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t750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
35
|
+
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2021-
|
37
|
+
date: 2021-11-27 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: karafka
|
@@ -59,7 +59,6 @@ extra_rdoc_files: []
|
|
59
59
|
files:
|
60
60
|
- ".coditsu/ci.yml"
|
61
61
|
- ".diffend.yml"
|
62
|
-
- ".github/FUNDING.yml"
|
63
62
|
- ".github/workflows/ci.yml"
|
64
63
|
- ".gitignore"
|
65
64
|
- ".rspec"
|
@@ -74,6 +73,7 @@ files:
|
|
74
73
|
- karafka-testing.gemspec
|
75
74
|
- lib/karafka-testing.rb
|
76
75
|
- lib/karafka/testing.rb
|
76
|
+
- lib/karafka/testing/dummy_client.rb
|
77
77
|
- lib/karafka/testing/errors.rb
|
78
78
|
- lib/karafka/testing/rspec/helpers.rb
|
79
79
|
- lib/karafka/testing/version.rb
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.2.
|
99
|
+
rubygems_version: 3.2.25
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Library which provides helpers for easier Karafka consumers tests
|
metadata.gz.sig
CHANGED
Binary file
|
data/.github/FUNDING.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
open_collective: karafka
|