nonnative 2.15.1 → 2.16.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df0fc1bbc0cd9de5368098691bb6c4b812029d70a3d8df236b587874b96e9baf
4
- data.tar.gz: 431042c13689b0dec97b2064c130a1b104a167fafecda20f6e90aff2e9c22190
3
+ metadata.gz: 9b79bc3b75303cd4d605a4ef81c7b3c1eedd188204d088864fefb65dc73f0922
4
+ data.tar.gz: c8e4b5ef1bb12213e80d7084d5b3809206279a44bca610947114fd41dd188745
5
5
  SHA512:
6
- metadata.gz: 5dd146af474ac19e1173b38701a75383dd5650e6a182b529c20d2290c44a037072025eee23cc0f6bd06326fc91690d6da83ff746be5cac443609703d5da59075
7
- data.tar.gz: 7d7dcbebffa532f5dfe93b4c80ff563d4b0bd5c329a092fc69fcbe1930cd8dac1f191cc04a9ff2dd0de15447b3f446ea134bd9708993e20e7bac780c41122d99
6
+ metadata.gz: a58c635d40b6eeb8b6aa7e9560900bad247fe768f9839b7e141f6be4e500b5fa2ec11267524621db66989f6eaf24601b790716a4508e28203e4845862ad5a289
7
+ data.tar.gz: 111995ab26c566d24df0fb037c094883ac07adf2142254fde6822fb9e4fcea59c855196c650bac382e5ab02fe2610181611040a96f3d13515aef586495ffaf72
data/.circleci/config.yml CHANGED
@@ -3,7 +3,7 @@ version: 2.1
3
3
  jobs:
4
4
  build:
5
5
  docker:
6
- - image: alexfalkowski/ruby:2.15
6
+ - image: alexfalkowski/ruby:3.8
7
7
  working_directory: ~/nonnative
8
8
  steps:
9
9
  - checkout:
@@ -35,7 +35,7 @@ jobs:
35
35
  resource_class: arm.large
36
36
  sync:
37
37
  docker:
38
- - image: alexfalkowski/release:7.16
38
+ - image: alexfalkowski/release:8.8
39
39
  working_directory: ~/nonnative
40
40
  steps:
41
41
  - checkout:
@@ -46,7 +46,7 @@ jobs:
46
46
  resource_class: arm.large
47
47
  version:
48
48
  docker:
49
- - image: alexfalkowski/release:7.16
49
+ - image: alexfalkowski/release:8.8
50
50
  working_directory: ~/nonnative
51
51
  steps:
52
52
  - checkout:
@@ -58,7 +58,7 @@ jobs:
58
58
  resource_class: arm.large
59
59
  wait-all:
60
60
  docker:
61
- - image: alexfalkowski/ruby:2.15
61
+ - image: alexfalkowski/ruby:3.8
62
62
  steps:
63
63
  - run: echo "all applicable jobs finished"
64
64
  resource_class: arm.large
data/AGENTS.md CHANGED
@@ -1,13 +1,16 @@
1
1
  # AGENTS.md
2
2
 
3
+ ## Shared skills
4
+
5
+ This repository uses the shared skills from `bin/skills/`. Read
6
+ `bin/AGENTS.md` for the canonical shared skill list and use the smallest
7
+ matching skill for the task.
8
+
3
9
  `nonnative` is a Ruby gem for end-to-end testing systems implemented in other
4
10
  languages. It starts processes, in-process servers, and proxy-only services,
5
11
  waits on TCP readiness/shutdown, and can place fault-injection proxies in front
6
12
  of dependencies.
7
13
 
8
- Use `./bin/skills/coding-standards` for shared coding, review, testing,
9
- documentation, and PR conventions. This file only adds repo-specific context.
10
-
11
14
  ## Map And Commands
12
15
 
13
16
  - Library: `lib/nonnative/**/*.rb`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nonnative (2.15.1)
4
+ nonnative (2.16.0)
5
5
  concurrent-ruby (>= 1, < 2)
6
6
  config (>= 5, < 6)
7
7
  cucumber (>= 7, < 12)
@@ -206,4 +206,4 @@ DEPENDENCIES
206
206
  simplecov-cobertura
207
207
 
208
208
  BUNDLED WITH
209
- 4.0.10
209
+ 4.0.11
data/README.md CHANGED
@@ -56,6 +56,8 @@ Runner fields (process/server/service):
56
56
 
57
57
  For `fault_injection`, the nested `proxy.host`/`proxy.port` describe the upstream target behind the proxy. In-process server implementations typically bind there via `proxy.host` / `proxy.port`.
58
58
 
59
+ Nonnative readiness and shutdown checks are TCP-only. Configure ports that are dedicated to the test run; if another process is already listening on the same `host`/`port`, results are undefined.
60
+
59
61
  ### Lifecycle strategies (Cucumber integration)
60
62
 
61
63
  Nonnative ships Cucumber hooks (when loaded) that support these tags/strategies:
@@ -88,6 +88,8 @@ module Nonnative
88
88
  end
89
89
 
90
90
  module LifecycleSteps
91
+ SERVICE_UNAVAILABLE = 'Service Unavailable'
92
+
91
93
  def install_state_steps
92
94
  install_start_step
93
95
  install_attempt_start_step
@@ -125,7 +127,11 @@ module Nonnative
125
127
 
126
128
  Then('I should see {string} as unhealthy') do |service|
127
129
  wait_for { Nonnative.observability.health(opts).code }.to eq(503)
128
- wait_for { Nonnative.observability.health(opts).body }.to include(service)
130
+ wait_for { Nonnative.observability.health(opts).body }.to satisfy do |body|
131
+ body = body.to_s.strip
132
+
133
+ body == SERVICE_UNAVAILABLE || body.include?(service)
134
+ end
129
135
  end
130
136
  end
131
137
 
@@ -134,7 +140,11 @@ module Nonnative
134
140
 
135
141
  Then('I should see {string} as healthy') do |service|
136
142
  wait_for { Nonnative.observability.health(opts).code }.to eq(200)
137
- wait_for { Nonnative.observability.health(opts).body }.to_not include(service)
143
+ wait_for { Nonnative.observability.health(opts).body }.to satisfy do |body|
144
+ body = body.to_s.strip
145
+
146
+ body != SERVICE_UNAVAILABLE && !body.include?(service)
147
+ end
138
148
  end
139
149
  end
140
150
 
@@ -4,5 +4,5 @@ module Nonnative
4
4
  # The current gem version.
5
5
  #
6
6
  # @return [String]
7
- VERSION = '2.15.1'
7
+ VERSION = '2.16.0'
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nonnative
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.1
4
+ version: 2.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Falkowski
@@ -345,7 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
345
  - !ruby/object:Gem::Version
346
346
  version: '0'
347
347
  requirements: []
348
- rubygems_version: 4.0.10
348
+ rubygems_version: 4.0.11
349
349
  specification_version: 4
350
350
  summary: Allows you to keep using the power of ruby to test other systems
351
351
  test_files: []