hammer_cli_katello 1.11.1 → 1.11.2

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: 9cf7344e6967145800645215edfbb673be76e52f474c0880a83fb8f6346dd856
4
- data.tar.gz: 876e14fc10bee220dde7f7cdf8ed5328fd18aa7f37ef56e9e01a4c2c084bd412
3
+ metadata.gz: 2a0bb232e9b8a0584ba860f898664e6a36817703793cd4fabe1538c06e899efc
4
+ data.tar.gz: fbade16a47cee20fa65a9abbcfefb77b8811e0d091547d366bfe8a027531c819
5
5
  SHA512:
6
- metadata.gz: ead4ed548201aee32badbe54b9e69723bda16bbd5eddcc07c187789c8307945fc3ef1782950d51b5fbbb9a205d0b630d238b773a6235f5810e64676f41888f38
7
- data.tar.gz: 6b97f0ce952c97ee347efe30c03ef0c87cc57f3edf805a6b6c315a90e1aba0f0f4c3a24d1889dd7503cbfd58b9dcb57a97eb267d1bcbdf8e92d8336973acc912
6
+ metadata.gz: 6b535f374bfecfa675fe4dad827fc395eae0c013c829b1106b92776f71284cf06db6f5160330fe49e29345939670552b54de67c3ee2d481aa063c436a952d373
7
+ data.tar.gz: 42efbf0e089b7b1dad5b4d48104a0aa081c9afb731f8e34875262d3f6eabb57b90480ffbb106526a39a6d901d41631635b4f15521bfc54262e84edbf287eb364
@@ -218,7 +218,7 @@ module HammerCLIKatello
218
218
  data["lifecycle_environments"].each do |lce|
219
219
  lce["content_views"].each do |cv|
220
220
  cv["repositories"].each do |repo|
221
- if cv["up_to_date"]
221
+ if cv["up_to_date"] && !data.dig("content_counts").nil?
222
222
  cvv_count_repos = data.dig("content_counts", "content_view_versions",
223
223
  cv["cvv_id"].to_s, "repositories")
224
224
  cvv_count_repos.each do |_repo_id, counts_and_metadata|
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('1.11.1')
3
+ @version ||= Gem::Version.new('1.11.2')
4
4
  end
5
5
  end
@@ -0,0 +1,6 @@
1
+ {
2
+ "last_sync_time": "2016-01-10 00:27:51 +0100",
3
+ "active_sync_tasks": [],
4
+ "last_failed_sync_tasks": [],
5
+ "lifecycle_environments": []
6
+ }
@@ -53,6 +53,49 @@ describe 'capsule content info' do
53
53
  assert_cmd(expected_result, result)
54
54
  end
55
55
 
56
+ it "works with no content counts" do
57
+ @sync_status = load_json('./data/sync_status_no_counts.json', __FILE__)
58
+ @sync_status['lifecycle_environments'] = [
59
+ load_json('./data/library_env.json', __FILE__),
60
+ load_json('./data/unsynced_env.json', __FILE__)
61
+ ]
62
+
63
+ ex = api_expects(:capsule_content, :sync_status, 'Get sync info') do |par|
64
+ par['id'] == 3
65
+ end
66
+ ex.returns(@sync_status)
67
+
68
+ output = OutputMatcher.new([
69
+ "Lifecycle Environments:",
70
+ " 1) Name: Library",
71
+ " Organization: Default Organization",
72
+ " Content Views:",
73
+ " 1) Name: Zoo View",
74
+ " Composite: no",
75
+ " Last Published: 2023/10/09 19:18:15",
76
+ " Repositories:",
77
+ " 1) Repository ID: 2",
78
+ " Repository Name: Zoo",
79
+ " Content Counts:",
80
+ " Warning: Content view must be synced to see content counts",
81
+ " 2) Name: Test",
82
+ " Organization: Default Organization",
83
+ " Content Views:",
84
+ " 1) Name: Zoo View",
85
+ " Composite: no",
86
+ " Last Published: 2023/10/09 19:18:15",
87
+ " Repositories:",
88
+ " 1) Repository ID: 2",
89
+ " Repository Name: Zoo",
90
+ " Content Counts:",
91
+ " Warning: Content view must be synced to see content counts"
92
+ ])
93
+ expected_result = success_result(output)
94
+
95
+ result = run_cmd(@cmd + params)
96
+ assert_cmd(expected_result, result)
97
+ end
98
+
56
99
  it "resolves id from name" do
57
100
  params = ['--name=capsule1']
58
101
 
@@ -1,4 +1,5 @@
1
1
  require_relative '../../test_helper'
2
+ require 'hammer_cli_katello/content_view_version'
2
3
 
3
4
  module HammerCLIKatello
4
5
  describe ContentViewVersion::RepublishRepositoriesCommand do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.1
4
+ version: 1.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Price
@@ -37,7 +37,7 @@ authors:
37
37
  autorequire:
38
38
  bindir: bin
39
39
  cert_chain: []
40
- date: 2023-12-11 00:00:00.000000000 Z
40
+ date: 2024-02-16 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: hammer_cli_foreman
@@ -435,6 +435,7 @@ files:
435
435
  - test/functional/capsule/content/capsule_content_helpers.rb
436
436
  - test/functional/capsule/content/data/library_env.json
437
437
  - test/functional/capsule/content/data/sync_status.json
438
+ - test/functional/capsule/content/data/sync_status_no_counts.json
438
439
  - test/functional/capsule/content/data/sync_tasks.json
439
440
  - test/functional/capsule/content/data/unsynced_env.json
440
441
  - test/functional/capsule/content/info_test.rb
@@ -675,6 +676,7 @@ test_files:
675
676
  - test/functional/capsule/content/capsule_content_helpers.rb
676
677
  - test/functional/capsule/content/data/library_env.json
677
678
  - test/functional/capsule/content/data/sync_status.json
679
+ - test/functional/capsule/content/data/sync_status_no_counts.json
678
680
  - test/functional/capsule/content/data/sync_tasks.json
679
681
  - test/functional/capsule/content/data/unsynced_env.json
680
682
  - test/functional/capsule/content/info_test.rb