karafka-testing 1.3.1 → 1.4.0
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.tar.gz.sig +0 -0
- data/.diffend.yml +3 -0
- data/.github/workflows/ci.yml +26 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +18 -19
- data/certs/mensfeld.pem +21 -21
- data/karafka-testing.gemspec +1 -1
- data/lib/karafka/testing/rspec/helpers.rb +8 -10
- data/lib/karafka/testing/version.rb +1 -1
- metadata +27 -26
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0298e37f23636bffa1ff1d652539060a6847e0bf7425da023a54c6805aa157f6'
|
4
|
+
data.tar.gz: 14d526794e88e6514670a66b4357422fc826d6c7aca70e8ec5a2ca3a70d3c134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9176308309e664d1cb7a1dd0769c233d8d8631850b3005026b044423f8f2642aac7e596727e4b30d7562711ce7a24db0c6cbb6c4e6089ce1619d39a1104fc66b
|
7
|
+
data.tar.gz: be8a892da240be42bfd317e9662cbb86aedb8750d4fa44da8108495ee738f1339ad6f533f3e194cb536e081c095886ccd54711042b445318789d9d014b42d470
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.diffend.yml
ADDED
data/.github/workflows/ci.yml
CHANGED
@@ -6,6 +6,32 @@ on:
|
|
6
6
|
- cron: '0 1 * * *'
|
7
7
|
|
8
8
|
jobs:
|
9
|
+
specs:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
ruby:
|
15
|
+
- '2.7'
|
16
|
+
- '2.6'
|
17
|
+
- '2.5'
|
18
|
+
include:
|
19
|
+
- ruby: '2.7'
|
20
|
+
coverage: 'true'
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Install package dependencies
|
24
|
+
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
25
|
+
- name: Set up Ruby
|
26
|
+
uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: ${{matrix.ruby}}
|
29
|
+
- name: Install latest bundler
|
30
|
+
run: |
|
31
|
+
gem install bundler --no-document
|
32
|
+
- name: Bundle install
|
33
|
+
run: |
|
34
|
+
bundle install --jobs 4 --retry 3
|
9
35
|
coditsu:
|
10
36
|
runs-on: ubuntu-latest
|
11
37
|
strategy:
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
karafka-testing (1.
|
5
|
-
karafka (~> 1.
|
4
|
+
karafka-testing (1.4.0)
|
5
|
+
karafka (~> 1.4.0.rc2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
concurrent-ruby (1.1.
|
10
|
+
concurrent-ruby (1.1.7)
|
11
11
|
delivery_boy (1.0.1)
|
12
12
|
king_konf (~> 0.3)
|
13
13
|
ruby-kafka (~> 1.0)
|
14
|
-
digest-crc (0.
|
15
|
-
|
14
|
+
digest-crc (0.6.1)
|
15
|
+
rake (~> 13.0)
|
16
|
+
dry-configurable (0.11.6)
|
16
17
|
concurrent-ruby (~> 1.0)
|
17
18
|
dry-core (~> 0.4, >= 0.4.7)
|
18
19
|
dry-equalizer (~> 0.2)
|
@@ -28,7 +29,7 @@ GEM
|
|
28
29
|
dry-equalizer (~> 0.2)
|
29
30
|
dry-inflector (0.2.0)
|
30
31
|
dry-initializer (3.0.3)
|
31
|
-
dry-logic (1.0.
|
32
|
+
dry-logic (1.0.7)
|
32
33
|
concurrent-ruby (~> 1.0)
|
33
34
|
dry-core (~> 0.2)
|
34
35
|
dry-equalizer (~> 0.2)
|
@@ -37,7 +38,7 @@ GEM
|
|
37
38
|
dry-core (~> 0.4)
|
38
39
|
dry-equalizer (~> 0.2)
|
39
40
|
dry-events (~> 0.2)
|
40
|
-
dry-schema (1.5.
|
41
|
+
dry-schema (1.5.4)
|
41
42
|
concurrent-ruby (~> 1.0)
|
42
43
|
dry-configurable (~> 0.8, >= 0.8.3)
|
43
44
|
dry-core (~> 0.4)
|
@@ -52,47 +53,45 @@ GEM
|
|
52
53
|
dry-equalizer (~> 0.3)
|
53
54
|
dry-inflector (~> 0.1, >= 0.1.2)
|
54
55
|
dry-logic (~> 1.0, >= 1.0.2)
|
55
|
-
dry-validation (1.5.
|
56
|
+
dry-validation (1.5.6)
|
56
57
|
concurrent-ruby (~> 1.0)
|
57
58
|
dry-container (~> 0.7, >= 0.7.1)
|
58
59
|
dry-core (~> 0.4)
|
59
60
|
dry-equalizer (~> 0.2)
|
60
61
|
dry-initializer (~> 3.0)
|
61
|
-
dry-schema (~> 1.5)
|
62
|
+
dry-schema (~> 1.5, >= 1.5.2)
|
62
63
|
envlogic (1.1.2)
|
63
64
|
dry-inflector (~> 0.1)
|
64
65
|
io-console (0.5.6)
|
65
|
-
irb (1.2.
|
66
|
+
irb (1.2.4)
|
66
67
|
reline (>= 0.0.1)
|
67
|
-
karafka (1.
|
68
|
+
karafka (1.4.0.rc2)
|
68
69
|
dry-configurable (~> 0.8)
|
69
70
|
dry-inflector (~> 0.1)
|
70
71
|
dry-monitor (~> 0.3)
|
71
72
|
dry-validation (~> 1.2)
|
72
73
|
envlogic (~> 1.1)
|
73
74
|
irb (~> 1.0)
|
74
|
-
multi_json (>= 1.12)
|
75
75
|
rake (>= 11.3)
|
76
|
-
ruby-kafka (>= 0.
|
76
|
+
ruby-kafka (>= 1.0.0)
|
77
77
|
thor (>= 0.20)
|
78
|
-
waterdrop (~> 1.
|
78
|
+
waterdrop (~> 1.4.0)
|
79
79
|
zeitwerk (~> 2.1)
|
80
80
|
king_konf (0.3.7)
|
81
|
-
multi_json (1.14.1)
|
82
81
|
rake (13.0.1)
|
83
|
-
reline (0.1.
|
82
|
+
reline (0.1.4)
|
84
83
|
io-console (~> 0.5)
|
85
|
-
ruby-kafka (1.
|
84
|
+
ruby-kafka (1.2.0)
|
86
85
|
digest-crc
|
87
86
|
thor (1.0.1)
|
88
|
-
waterdrop (1.
|
87
|
+
waterdrop (1.4.0)
|
89
88
|
delivery_boy (>= 0.2, < 2.x)
|
90
89
|
dry-configurable (~> 0.8)
|
91
90
|
dry-monitor (~> 0.3)
|
92
91
|
dry-validation (~> 1.2)
|
93
92
|
ruby-kafka (>= 0.7.8)
|
94
93
|
zeitwerk (~> 2.1)
|
95
|
-
zeitwerk (2.
|
94
|
+
zeitwerk (2.4.0)
|
96
95
|
|
97
96
|
PLATFORMS
|
98
97
|
ruby
|
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
|
+
ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjAwODExMDkxNTM3WhcNMjEwODExMDkx
|
4
|
+
NTM3WjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
|
5
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDCpXsCgmINb6lHBXXBdyrgsBPSxC4/
|
6
|
+
2H+weJ6L9CruTiv2+2/ZkQGtnLcDgrD14rdLIHK7t0o3EKYlDT5GhD/XUVhI15JE
|
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vnmiq7S6eBF0H9qH8KyQ6
|
21
|
+
EkVLpvmUDFcf/uNaBQdazEMB5jYtwoA8gQlANETNGPi51KlkukhKgaIEDMkBDJOx
|
22
|
+
65N7DzmkcyY0/GwjIVIxmRhcrCt1YeCUElmfFx0iida1/YRm6sB2AXqScc1+ECRi
|
23
|
+
2DND//YJUikn1zwbz1kT70XmHd97B4Eytpln7K+M1u2g1pHVEPW4owD/ammXNpUy
|
24
|
+
nt70FcDD4yxJQ+0YNiHd0N8IcVBM1TMIVctMNQ==
|
25
25
|
-----END CERTIFICATE-----
|
data/karafka-testing.gemspec
CHANGED
@@ -51,7 +51,7 @@ module Karafka
|
|
51
51
|
# Adds a new Karafka params instance with given payload and options into an internal
|
52
52
|
# buffer that will be used to simulate messages delivery to the consumer
|
53
53
|
#
|
54
|
-
# @param
|
54
|
+
# @param raw_payload [String] anything you want to send
|
55
55
|
# @param opts [Hash] additional options with which you want to overwrite the
|
56
56
|
# message defaults (key, offset, etc)
|
57
57
|
#
|
@@ -64,21 +64,19 @@ module Karafka
|
|
64
64
|
# before do
|
65
65
|
# publish_for_karafka({ 'hello' => 'world' }.to_json, 'partition' => 6)
|
66
66
|
# end
|
67
|
-
def publish_for_karafka(
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
.merge!('payload' => payload)
|
72
|
-
.merge!(opts)
|
67
|
+
def publish_for_karafka(raw_payload, opts = {})
|
68
|
+
metadata = Karafka::Params::Metadata.new(
|
69
|
+
**metadata_defaults.merge(opts)
|
70
|
+
).freeze
|
73
71
|
|
74
|
-
|
75
|
-
|
72
|
+
_karafka_raw_data << Karafka::Params::Params.new(raw_payload, metadata)
|
73
|
+
subject.params_batch = Karafka::Params::ParamsBatch.new(_karafka_raw_data)
|
76
74
|
end
|
77
75
|
|
78
76
|
private
|
79
77
|
|
80
78
|
# @return [Hash] message default options
|
81
|
-
def
|
79
|
+
def metadata_defaults
|
82
80
|
{
|
83
81
|
'deserializer' => subject.topic.deserializer,
|
84
82
|
'create_time' => Time.now,
|
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
|
+
version: 1.4.0
|
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
|
+
ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjAwODExMDkxNTM3WhcNMjEwODExMDkx
|
15
|
+
NTM3WjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
|
16
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDCpXsCgmINb6lHBXXBdyrgsBPSxC4/
|
17
|
+
2H+weJ6L9CruTiv2+2/ZkQGtnLcDgrD14rdLIHK7t0o3EKYlDT5GhD/XUVhI15JE
|
18
|
+
N7IqnPUgexe1fbZArwQ51afxz2AmPQN2BkB2oeQHXxnSWUGMhvcEZpfbxCCJH26w
|
19
|
+
hS0Ccsma8yxA6hSlGVhFVDuCr7c2L1di6cK2CtIDpfDaWqnVNJEwBYHIxrCoWK5g
|
20
|
+
sIGekVt/admS9gRhIMaIBg+Mshth5/DEyWO2QjteTodItlxfTctrfmiAl8X8T5JP
|
21
|
+
VXeLp5SSOJ5JXE80nShMJp3RFnGw5fqjX/ffjtISYh78/By4xF3a25HdWH9+qO2Z
|
22
|
+
tx0wSGc9/4gqNM0APQnjN/4YXrGZ4IeSjtE+OrrX07l0Ti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 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: karafka
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - "~>"
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
45
|
+
version: 1.4.0.rc2
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.
|
52
|
+
version: 1.4.0.rc2
|
53
53
|
description: Library which provides helpers for easier Karafka consumers tests
|
54
54
|
email:
|
55
55
|
- maciej@mensfeld.pl
|
@@ -58,6 +58,7 @@ extensions: []
|
|
58
58
|
extra_rdoc_files: []
|
59
59
|
files:
|
60
60
|
- ".coditsu/ci.yml"
|
61
|
+
- ".diffend.yml"
|
61
62
|
- ".github/FUNDING.yml"
|
62
63
|
- ".github/workflows/ci.yml"
|
63
64
|
- ".gitignore"
|
@@ -95,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
96
|
- !ruby/object:Gem::Version
|
96
97
|
version: '0'
|
97
98
|
requirements: []
|
98
|
-
rubygems_version: 3.1.
|
99
|
+
rubygems_version: 3.1.4
|
99
100
|
signing_key:
|
100
101
|
specification_version: 4
|
101
102
|
summary: Library which provides helpers for easier Karafka consumers tests
|
metadata.gz.sig
CHANGED
Binary file
|