Skip to content

Commit

Permalink
Handles empty firewall rule description - BR-2812
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaumont committed Oct 24, 2024
1 parent c829232 commit 382e3b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- `cb config-param list-supported` now returns `min_value`, `max_value`, and
`enum` constraints for each parameters, if applicable.
### Fixed
- `cb info` now correctly handles firewall rules with an empty description.

## [3.6.0] - 2024-07-26
### Added
Expand Down
4 changes: 3 additions & 1 deletion spec/cb/firewall_rule_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ Spectator.describe FirewallRuleList do
}

it "outputs table with header" do
expect(client).to receive(:get_firewall_rules).and_return [Factory.firewall_rule(description: nil)]

action.call

expected = <<-EXPECTED
ID Rule Description
shofthj3fzaipie44lt6a5i3de 1.2.3.0/24 Example Description
shofthj3fzaipie44lt6a5i3de 1.2.3.0/24
EXPECTED

expect(&.output.to_s).to look_like expected
Expand Down
2 changes: 1 addition & 1 deletion src/models/firewall_rule.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CB::Model
jrecord FirewallRule,
id : String,
description : String,
description : String?,
rule : String
end

0 comments on commit 382e3b0

Please sign in to comment.