hammer_cli_katello 1.11.2 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hammer_cli_katello/capsule.rb +48 -14
  3. data/lib/hammer_cli_katello/command_extensions/kickstart_repository.rb +1 -1
  4. data/lib/hammer_cli_katello/content_view.rb +56 -9
  5. data/lib/hammer_cli_katello/content_view_version.rb +13 -0
  6. data/lib/hammer_cli_katello/host_extensions.rb +6 -2
  7. data/lib/hammer_cli_katello/organization.rb +0 -23
  8. data/lib/hammer_cli_katello/product.rb +17 -0
  9. data/lib/hammer_cli_katello/repository.rb +70 -15
  10. data/lib/hammer_cli_katello/subscription.rb +2 -2
  11. data/lib/hammer_cli_katello/version.rb +1 -1
  12. data/lib/hammer_cli_katello.rb +0 -6
  13. data/locale/bn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  14. data/locale/bn/hammer-cli-katello.edit.po +3255 -0
  15. data/locale/bn/hammer-cli-katello.po +1 -94
  16. data/locale/bn/hammer-cli-katello.po.time_stamp +0 -0
  17. data/locale/bn_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  18. data/locale/bn_IN/hammer-cli-katello.edit.po +3255 -0
  19. data/locale/bn_IN/hammer-cli-katello.po +1 -94
  20. data/locale/bn_IN/hammer-cli-katello.po.time_stamp +0 -0
  21. data/locale/bqi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  22. data/locale/bqi/hammer-cli-katello.edit.po +3251 -0
  23. data/locale/bqi/hammer-cli-katello.po +2133 -0
  24. data/locale/bqi/hammer-cli-katello.po.time_stamp +0 -0
  25. data/locale/ca/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  26. data/locale/ca/hammer-cli-katello.edit.po +3255 -0
  27. data/locale/ca/hammer-cli-katello.po +1 -94
  28. data/locale/ca/hammer-cli-katello.po.time_stamp +0 -0
  29. data/locale/cs_CZ/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  30. data/locale/cs_CZ/hammer-cli-katello.edit.po +3256 -0
  31. data/locale/cs_CZ/hammer-cli-katello.po +1 -94
  32. data/locale/cs_CZ/hammer-cli-katello.po.time_stamp +0 -0
  33. data/locale/de/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  34. data/locale/de/hammer-cli-katello.edit.po +3329 -0
  35. data/locale/de/hammer-cli-katello.po +1 -94
  36. data/locale/de/hammer-cli-katello.po.time_stamp +0 -0
  37. data/locale/de_AT/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  38. data/locale/de_AT/hammer-cli-katello.edit.po +3251 -0
  39. data/locale/de_AT/hammer-cli-katello.po +1 -94
  40. data/locale/de_AT/hammer-cli-katello.po.time_stamp +0 -0
  41. data/locale/de_DE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  42. data/locale/de_DE/hammer-cli-katello.edit.po +3257 -0
  43. data/locale/de_DE/hammer-cli-katello.po +1 -94
  44. data/locale/de_DE/hammer-cli-katello.po.time_stamp +0 -0
  45. data/locale/el/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  46. data/locale/el/hammer-cli-katello.edit.po +3255 -0
  47. data/locale/el/hammer-cli-katello.po +1 -94
  48. data/locale/el/hammer-cli-katello.po.time_stamp +0 -0
  49. data/locale/en/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  50. data/locale/en/hammer-cli-katello.edit.po +2745 -0
  51. data/locale/en/hammer-cli-katello.po +134 -125
  52. data/locale/en/hammer-cli-katello.po.time_stamp +0 -0
  53. data/locale/en_GB/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  54. data/locale/en_GB/hammer-cli-katello.edit.po +3256 -0
  55. data/locale/en_GB/hammer-cli-katello.po +1 -94
  56. data/locale/en_GB/hammer-cli-katello.po.time_stamp +0 -0
  57. data/locale/en_US/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  58. data/locale/en_US/hammer-cli-katello.edit.po +3251 -0
  59. data/locale/en_US/hammer-cli-katello.po +1 -94
  60. data/locale/en_US/hammer-cli-katello.po.time_stamp +0 -0
  61. data/locale/es/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  62. data/locale/es/hammer-cli-katello.edit.po +3323 -0
  63. data/locale/es/hammer-cli-katello.po +5 -96
  64. data/locale/es/hammer-cli-katello.po.time_stamp +0 -0
  65. data/locale/et_EE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  66. data/locale/et_EE/hammer-cli-katello.edit.po +3251 -0
  67. data/locale/et_EE/hammer-cli-katello.po +1 -94
  68. data/locale/et_EE/hammer-cli-katello.po.time_stamp +0 -0
  69. data/locale/fr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  70. data/locale/fr/hammer-cli-katello.edit.po +3347 -0
  71. data/locale/fr/hammer-cli-katello.po +12 -106
  72. data/locale/fr/hammer-cli-katello.po.time_stamp +0 -0
  73. data/locale/gl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  74. data/locale/gl/hammer-cli-katello.edit.po +3255 -0
  75. data/locale/gl/hammer-cli-katello.po +1 -94
  76. data/locale/gl/hammer-cli-katello.po.time_stamp +0 -0
  77. data/locale/gu/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  78. data/locale/gu/hammer-cli-katello.edit.po +3255 -0
  79. data/locale/gu/hammer-cli-katello.po +1 -94
  80. data/locale/gu/hammer-cli-katello.po.time_stamp +0 -0
  81. data/locale/hammer-cli-katello.pot +304 -312
  82. data/locale/he_IL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  83. data/locale/he_IL/hammer-cli-katello.edit.po +3255 -0
  84. data/locale/he_IL/hammer-cli-katello.po +3 -96
  85. data/locale/he_IL/hammer-cli-katello.po.time_stamp +0 -0
  86. data/locale/hi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  87. data/locale/hi/hammer-cli-katello.edit.po +3255 -0
  88. data/locale/hi/hammer-cli-katello.po +1 -94
  89. data/locale/hi/hammer-cli-katello.po.time_stamp +0 -0
  90. data/locale/id/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  91. data/locale/id/hammer-cli-katello.edit.po +3255 -0
  92. data/locale/id/hammer-cli-katello.po +13 -102
  93. data/locale/id/hammer-cli-katello.po.time_stamp +0 -0
  94. data/locale/it/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  95. data/locale/it/hammer-cli-katello.edit.po +3261 -0
  96. data/locale/it/hammer-cli-katello.po +1 -94
  97. data/locale/it/hammer-cli-katello.po.time_stamp +0 -0
  98. data/locale/ja/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  99. data/locale/ja/hammer-cli-katello.edit.po +3273 -0
  100. data/locale/ja/hammer-cli-katello.po +4 -97
  101. data/locale/ja/hammer-cli-katello.po.time_stamp +0 -0
  102. data/locale/ka/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  103. data/locale/ka/hammer-cli-katello.edit.po +3351 -0
  104. data/locale/ka/hammer-cli-katello.po +1 -94
  105. data/locale/ka/hammer-cli-katello.po.time_stamp +0 -0
  106. data/locale/kn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  107. data/locale/kn/hammer-cli-katello.edit.po +3255 -0
  108. data/locale/kn/hammer-cli-katello.po +1 -94
  109. data/locale/kn/hammer-cli-katello.po.time_stamp +0 -0
  110. data/locale/ko/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  111. data/locale/ko/hammer-cli-katello.edit.po +3258 -0
  112. data/locale/ko/hammer-cli-katello.po +1 -94
  113. data/locale/ko/hammer-cli-katello.po.time_stamp +0 -0
  114. data/locale/ml_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  115. data/locale/ml_IN/hammer-cli-katello.edit.po +3251 -0
  116. data/locale/ml_IN/hammer-cli-katello.po +1 -94
  117. data/locale/ml_IN/hammer-cli-katello.po.time_stamp +0 -0
  118. data/locale/mr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  119. data/locale/mr/hammer-cli-katello.edit.po +3255 -0
  120. data/locale/mr/hammer-cli-katello.po +1 -94
  121. data/locale/mr/hammer-cli-katello.po.time_stamp +0 -0
  122. data/locale/nl_NL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  123. data/locale/nl_NL/hammer-cli-katello.edit.po +3259 -0
  124. data/locale/nl_NL/hammer-cli-katello.po +1 -94
  125. data/locale/nl_NL/hammer-cli-katello.po.time_stamp +0 -0
  126. data/locale/or/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  127. data/locale/or/hammer-cli-katello.edit.po +3255 -0
  128. data/locale/or/hammer-cli-katello.po +1 -94
  129. data/locale/or/hammer-cli-katello.po.time_stamp +0 -0
  130. data/locale/pa/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  131. data/locale/pa/hammer-cli-katello.edit.po +3255 -0
  132. data/locale/pa/hammer-cli-katello.po +1 -94
  133. data/locale/pa/hammer-cli-katello.po.time_stamp +0 -0
  134. data/locale/pl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  135. data/locale/pl/hammer-cli-katello.edit.po +3256 -0
  136. data/locale/pl/hammer-cli-katello.po +1 -94
  137. data/locale/pl/hammer-cli-katello.po.time_stamp +0 -0
  138. data/locale/pl_PL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  139. data/locale/pl_PL/hammer-cli-katello.edit.po +3251 -0
  140. data/locale/pl_PL/hammer-cli-katello.po +1 -94
  141. data/locale/pl_PL/hammer-cli-katello.po.time_stamp +0 -0
  142. data/locale/pt/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  143. data/locale/pt/hammer-cli-katello.edit.po +3255 -0
  144. data/locale/pt/hammer-cli-katello.po +1 -94
  145. data/locale/pt/hammer-cli-katello.po.time_stamp +0 -0
  146. data/locale/pt_BR/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  147. data/locale/pt_BR/hammer-cli-katello.edit.po +3315 -0
  148. data/locale/pt_BR/hammer-cli-katello.po +5 -96
  149. data/locale/pt_BR/hammer-cli-katello.po.time_stamp +0 -0
  150. data/locale/ro/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  151. data/locale/ro/hammer-cli-katello.edit.po +3251 -0
  152. data/locale/ro/hammer-cli-katello.po +1 -94
  153. data/locale/ro/hammer-cli-katello.po.time_stamp +0 -0
  154. data/locale/ro_RO/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  155. data/locale/ro_RO/hammer-cli-katello.edit.po +3251 -0
  156. data/locale/ro_RO/hammer-cli-katello.po +1 -94
  157. data/locale/ro_RO/hammer-cli-katello.po.time_stamp +0 -0
  158. data/locale/ru/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  159. data/locale/ru/hammer-cli-katello.edit.po +3260 -0
  160. data/locale/ru/hammer-cli-katello.po +1 -94
  161. data/locale/ru/hammer-cli-katello.po.time_stamp +0 -0
  162. data/locale/sl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  163. data/locale/sl/hammer-cli-katello.edit.po +3255 -0
  164. data/locale/sl/hammer-cli-katello.po +1 -94
  165. data/locale/sl/hammer-cli-katello.po.time_stamp +0 -0
  166. data/locale/sv_SE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  167. data/locale/sv_SE/hammer-cli-katello.edit.po +3256 -0
  168. data/locale/sv_SE/hammer-cli-katello.po +1 -94
  169. data/locale/sv_SE/hammer-cli-katello.po.time_stamp +0 -0
  170. data/locale/ta/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  171. data/locale/ta/hammer-cli-katello.edit.po +3255 -0
  172. data/locale/ta/hammer-cli-katello.po +1 -94
  173. data/locale/ta/hammer-cli-katello.po.time_stamp +0 -0
  174. data/locale/ta_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  175. data/locale/ta_IN/hammer-cli-katello.edit.po +3255 -0
  176. data/locale/ta_IN/hammer-cli-katello.po +1 -94
  177. data/locale/ta_IN/hammer-cli-katello.po.time_stamp +0 -0
  178. data/locale/te/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  179. data/locale/te/hammer-cli-katello.edit.po +3255 -0
  180. data/locale/te/hammer-cli-katello.po +1 -94
  181. data/locale/te/hammer-cli-katello.po.time_stamp +0 -0
  182. data/locale/tr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  183. data/locale/tr/hammer-cli-katello.edit.po +3255 -0
  184. data/locale/tr/hammer-cli-katello.po +1 -94
  185. data/locale/tr/hammer-cli-katello.po.time_stamp +0 -0
  186. data/locale/vi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  187. data/locale/vi/hammer-cli-katello.edit.po +3251 -0
  188. data/locale/vi/hammer-cli-katello.po +1 -94
  189. data/locale/vi/hammer-cli-katello.po.time_stamp +0 -0
  190. data/locale/vi_VN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  191. data/locale/vi_VN/hammer-cli-katello.edit.po +3251 -0
  192. data/locale/vi_VN/hammer-cli-katello.po +1 -94
  193. data/locale/vi_VN/hammer-cli-katello.po.time_stamp +0 -0
  194. data/locale/zh/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  195. data/locale/zh/hammer-cli-katello.edit.po +3251 -0
  196. data/locale/zh/hammer-cli-katello.po +1 -94
  197. data/locale/zh/hammer-cli-katello.po.time_stamp +0 -0
  198. data/locale/zh_CN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  199. data/locale/zh_CN/hammer-cli-katello.edit.po +3268 -0
  200. data/locale/zh_CN/hammer-cli-katello.po +4 -97
  201. data/locale/zh_CN/hammer-cli-katello.po.time_stamp +0 -0
  202. data/locale/zh_TW/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  203. data/locale/zh_TW/hammer-cli-katello.edit.po +3257 -0
  204. data/locale/zh_TW/hammer-cli-katello.po +1 -94
  205. data/locale/zh_TW/hammer-cli-katello.po.time_stamp +0 -0
  206. data/test/functional/acs/create_test.rb +3 -3
  207. data/test/functional/content_credentials/create_test.rb +2 -2
  208. data/test/functional/content_export/complete/repository_test.rb +7 -7
  209. data/test/functional/content_export/incremental/repository_test.rb +6 -6
  210. data/test/functional/content_import/library_test.rb +5 -3
  211. data/test/functional/content_import/version_test.rb +5 -3
  212. data/test/functional/content_view/component/add_test.rb +4 -4
  213. data/test/functional/content_view/component/remove_test.rb +6 -6
  214. data/test/functional/content_view/component/update_test.rb +5 -5
  215. data/test/functional/content_view/create_test.rb +3 -3
  216. data/test/functional/organization/info_test.rb +0 -14
  217. data/test/functional/product/{update_proxy.rb → update_proxy_test.rb} +8 -14
  218. data/test/functional/product/verify_checksum_test.rb +31 -0
  219. data/test/functional/repository/create_test.rb +3 -3
  220. data/test/functional/repository/info_test.rb +2 -2
  221. data/test/functional/repository/verify_checksum_test.rb +105 -0
  222. data/test/functional/sync_plan/create_test.rb +9 -9
  223. data/test/functional/sync_plan/delete_test.rb +3 -3
  224. data/test/functional/sync_plan/update_test.rb +5 -5
  225. data/test/test_helper.rb +1 -0
  226. metadata +118 -146
  227. data/lib/hammer_cli_katello/simple_content_access.rb +0 -59
  228. data/test/functional/simple_content_access/disable_test.rb +0 -48
  229. data/test/functional/simple_content_access/enable_test.rb +0 -46
  230. data/test/functional/simple_content_access/status_test.rb +0 -29
@@ -11,7 +11,7 @@
11
11
  #, fuzzy
12
12
  msgid ""
13
13
  msgstr ""
14
- "Project-Id-Version: hammer-cli-katello 1.11.0.pre.master\n"
14
+ "Project-Id-Version: hammer-cli-katello 1.13.0.pre.master\n"
15
15
  "Report-Msgid-Bugs-To: \n"
16
16
  "POT-Creation-Date: 2023-07-12 17:04+0000\n"
17
17
  "PO-Revision-Date: 2017-09-11 13:28+0000\n"
@@ -2137,96 +2137,3 @@ msgstr "同步計劃已刪除"
2137
2137
 
2138
2138
  msgid "Could not destroy the sync plan"
2139
2139
  msgstr "無法刪除同步計劃"
2140
-
2141
- msgid "Refresh all alternate content sources"
2142
- msgstr ""
2143
-
2144
- msgid "Successfully refreshed all alternate content sources"
2145
- msgstr ""
2146
-
2147
- msgid "Could not refresh all alternate content sources"
2148
- msgstr ""
2149
-
2150
- msgid "Refresh alternate content sources"
2151
- msgstr ""
2152
-
2153
- msgid "Successfully refreshed specified alternate content sources"
2154
- msgstr ""
2155
-
2156
- msgid "Could not refresh the specified alternate content sources"
2157
- msgstr ""
2158
-
2159
- msgid "Destroy alternate content sources"
2160
- msgstr ""
2161
-
2162
- msgid "Sucessfully destroyed specified alternate content sources"
2163
- msgstr ""
2164
-
2165
- msgid "Could not destroy the specified alternate content sources"
2166
- msgstr ""
2167
-
2168
- msgid "Capsule reclaim space has been started in task %{id}."
2169
- msgstr ""
2170
-
2171
- msgid "Capsule reclaim space was unsuccessful."
2172
- msgstr ""
2173
-
2174
- msgid "Capsule content counts are being updated in task %{id}."
2175
- msgstr ""
2176
-
2177
- msgid "Could not update capsule content counts"
2178
- msgstr ""
2179
-
2180
- msgid "SRPMs"
2181
- msgstr ""
2182
-
2183
- msgid "Debian Packages"
2184
- msgstr ""
2185
-
2186
- msgid "Container Tags"
2187
- msgstr ""
2188
-
2189
- msgid "Container Manifests"
2190
- msgstr ""
2191
-
2192
- msgid "Container Manifest Lists"
2193
- msgstr ""
2194
-
2195
- msgid "Ansible Collections"
2196
- msgstr ""
2197
-
2198
- msgid "OSTree Refs"
2199
- msgstr ""
2200
-
2201
- msgid "Python Packages"
2202
- msgstr ""
2203
-
2204
- msgid "Content view must be synced to see content counts"
2205
- msgstr ""
2206
-
2207
- msgid "Original packages"
2208
- msgstr ""
2209
-
2210
- msgid "Original module streams"
2211
- msgstr ""
2212
-
2213
- msgid "UUID"
2214
- msgstr ""
2215
-
2216
- msgid "Module stream Id"
2217
- msgstr ""
2218
-
2219
- msgid "Content view filter Id"
2220
- msgstr ""
2221
-
2222
- msgid "Errata Id"
2223
- msgstr ""
2224
-
2225
- msgid "Date type"
2226
- msgstr ""
2227
-
2228
- msgid "Start date"
2229
- msgstr ""
2230
-
2231
- msgid "End date"
2232
- msgstr ""
File without changes
@@ -1,11 +1,11 @@
1
1
  require File.join(File.dirname(__FILE__), '../test_helper')
2
2
 
3
- describe 'create content-credentials' do
3
+ describe 'create alternate content source' do
4
4
  before do
5
5
  @cmd = %w(alternate-content-source create)
6
6
  end
7
7
 
8
- let(:name) { 'pizza' }
8
+ let(:acs_name) { 'pizza' }
9
9
  let(:url) { 'http://proxy.example.com' }
10
10
  let(:acs_type) { 'custom' }
11
11
  let(:acs_content) { 'yum' }
@@ -14,7 +14,7 @@ describe 'create content-credentials' do
14
14
  let(:subpaths) { ['test/repo1/'] }
15
15
 
16
16
  it 'Creates an ACS' do
17
- params = ["--name=#{name}", "--alternate-content-source-type=#{acs_type}",
17
+ params = ["--name=#{acs_name}", "--alternate-content-source-type=#{acs_type}",
18
18
  "--base-url=#{url}", "--content-type=#{acs_content}", "--verify-ssl=#{verify_ssl}",
19
19
  "--smart-proxy-ids=#{proxy_id}", "--subpaths=#{subpaths}"]
20
20
 
@@ -3,11 +3,11 @@ require File.join(File.dirname(__FILE__), '../test_helper')
3
3
  describe 'create content-credentials' do
4
4
  before do
5
5
  @cmd = %w(content-credentials create)
6
- @base_params = ["--organization-id=#{org_id}", "--name=#{name}"]
6
+ @base_params = ["--organization-id=#{org_id}", "--name=#{cred_name}"]
7
7
  end
8
8
 
9
9
  let(:org_id) { 1 }
10
- let(:name) { 'sslcert' }
10
+ let(:cred_name) { 'sslcert' }
11
11
  let(:cert) { File.join(File.dirname(__FILE__), 'data', 'test_cert.json') }
12
12
 
13
13
  it 'Creates a SSL Content Credential' do
@@ -40,7 +40,7 @@ describe 'content-export complete repository' do
40
40
  let(:product_id) { '77' }
41
41
  let(:repository_id) { '1001' }
42
42
 
43
- let(:name) { 'repo' }
43
+ let(:repo_name) { 'repo' }
44
44
 
45
45
  it "performs export with required options and async" do
46
46
  params = [
@@ -111,7 +111,7 @@ describe 'content-export complete repository' do
111
111
  end
112
112
 
113
113
  it 'fails on missing product missing org' do
114
- params = ["--product=lol", "--name=#{name}"]
114
+ params = ["--product=lol", "--name=#{repo_name}"]
115
115
  result = run_cmd(@cmd + params)
116
116
  expected_error = "At least one of options --organization-id,"\
117
117
  " --organization, --organization-label is required"
@@ -122,13 +122,13 @@ describe 'content-export complete repository' do
122
122
 
123
123
  it 'correctly resolves product_id and repository name' do
124
124
  params = ["--product-id=#{product_id}",
125
- "--name=#{name}",
125
+ "--name=#{repo_name}",
126
126
  "--async"]
127
127
  expects_repository(repository_id, default_repository_options)
128
128
 
129
129
  cvv_expect = api_expects(:repositories, :index) do |p|
130
130
  assert_equal p['product_id'].to_s, product_id.to_s
131
- assert_equal p["name"], name
131
+ assert_equal p["name"], repo_name
132
132
  end
133
133
 
134
134
  cvv_expect.at_least_once.
@@ -203,11 +203,11 @@ describe 'content-export complete repository' do
203
203
 
204
204
  it 'should accept product and get the right repository' do
205
205
  params = ["--product-id=#{product_id}",
206
- "--name=#{name}"]
207
- expect_repository_search(product_id.to_i, name, repository_id).at_least_once
206
+ "--name=#{repo_name}"]
207
+ expect_repository_search(product_id.to_i, repo_name, repository_id).at_least_once
208
208
  repo_search = api_expects(:repositories, :index, 'Find a repository') do |p|
209
209
  assert_equal p["product_id"].to_s, product_id.to_s
210
- assert_equal p["name"], name
210
+ assert_equal p["name"], repo_name
211
211
  end
212
212
  repo_search.returns(index_response([{'id' => repository_id}]))
213
213
 
@@ -42,7 +42,7 @@ describe 'content-export incremental version' do
42
42
  let(:product_id) { '77' }
43
43
  let(:repository_id) { 100 }
44
44
 
45
- let(:name) { 'great' }
45
+ let(:repo_name) { 'great' }
46
46
 
47
47
  it "performs export with required options and async" do
48
48
  params = [
@@ -120,13 +120,13 @@ describe 'content-export incremental version' do
120
120
 
121
121
  it 'correctly resolves product_id and repository name' do
122
122
  params = ["--product-id=#{product_id}",
123
- "--name=#{name}",
123
+ "--name=#{repo_name}",
124
124
  "--async"]
125
125
  expects_repository(repository_id, default_repository_options)
126
126
 
127
127
  cvv_expect = api_expects(:repositories, :index) do |p|
128
128
  assert_equal p['product_id'].to_s, product_id.to_s
129
- assert_equal p["name"], name
129
+ assert_equal p["name"], repo_name
130
130
  end
131
131
 
132
132
  cvv_expect.at_least_once.
@@ -157,7 +157,7 @@ describe 'content-export incremental version' do
157
157
  end
158
158
 
159
159
  it 'fails on missing product missing org' do
160
- params = ["--product=lol", "--name=#{name}"]
160
+ params = ["--product=lol", "--name=#{repo_name}"]
161
161
  result = run_cmd(@cmd + params)
162
162
  expected_error = "At least one of options --organization-id,"\
163
163
  " --organization, --organization-label is required"
@@ -168,13 +168,13 @@ describe 'content-export incremental version' do
168
168
 
169
169
  it 'correctly resolves product_id and repository name' do
170
170
  params = ["--product-id=#{product_id}",
171
- "--name=#{name}",
171
+ "--name=#{repo_name}",
172
172
  "--async"]
173
173
  expects_repository(repository_id, default_repository_options)
174
174
 
175
175
  cvv_expect = api_expects(:repositories, :index) do |p|
176
176
  assert_equal p['product_id'].to_s, product_id.to_s
177
- assert_equal p["name"], name
177
+ assert_equal p["name"], repo_name
178
178
  end
179
179
 
180
180
  cvv_expect.at_least_once.
@@ -21,7 +21,7 @@ describe 'content-import library' do
21
21
  File.dirname(__FILE__)
22
22
  end
23
23
 
24
- let(:metadata) do
24
+ let(:metadata_json) do
25
25
  JSON.parse(File.read("#{path}/metadata.json"))
26
26
  end
27
27
 
@@ -34,7 +34,8 @@ describe 'content-import library' do
34
34
  '--async'
35
35
  ]
36
36
  api_expects(:content_imports, :library)
37
- .with_params('organization_id' => organization_id, 'path' => path, 'metadata' => metadata)
37
+ .with_params('organization_id' => organization_id, 'path' => path,
38
+ 'metadata' => metadata_json)
38
39
  .returns(response)
39
40
 
40
41
  result = run_cmd(@cmd + params)
@@ -50,7 +51,8 @@ describe 'content-import library' do
50
51
  ]
51
52
 
52
53
  api_expects(:content_imports, :library)
53
- .with_params('organization_id' => organization_id, 'path' => path, 'metadata' => metadata)
54
+ .with_params('organization_id' => organization_id, 'path' => path,
55
+ 'metadata' => metadata_json)
54
56
  .returns(response)
55
57
 
56
58
  expect_foreman_task(task_id)
@@ -21,7 +21,7 @@ describe 'content-import version' do
21
21
  File.dirname(__FILE__)
22
22
  end
23
23
 
24
- let(:metadata) do
24
+ let(:metadata_json) do
25
25
  JSON.parse(File.read("#{path}/metadata.json"))
26
26
  end
27
27
 
@@ -34,7 +34,8 @@ describe 'content-import version' do
34
34
  '--async'
35
35
  ]
36
36
  api_expects(:content_imports, :version)
37
- .with_params('organization_id' => organization_id, 'path' => path, 'metadata' => metadata)
37
+ .with_params('organization_id' => organization_id, 'path' => path,
38
+ 'metadata' => metadata_json)
38
39
  .returns(response)
39
40
 
40
41
  result = run_cmd(@cmd + params)
@@ -50,7 +51,8 @@ describe 'content-import version' do
50
51
  ]
51
52
 
52
53
  api_expects(:content_imports, :version)
53
- .with_params('organization_id' => organization_id, 'path' => path, 'metadata' => metadata)
54
+ .with_params('organization_id' => organization_id, 'path' => path,
55
+ 'metadata' => metadata_json)
54
56
  .returns(response)
55
57
 
56
58
  expect_foreman_task(task_id)
@@ -5,11 +5,11 @@ module HammerCLIKatello
5
5
  describe ContentViewComponent::AddComponents do
6
6
  before do
7
7
  @cmd = %w(content-view component add)
8
- @composite = OpenStruct.new(:id => 2, :name => "composite")
9
- @component_version = OpenStruct.new(:id => 666, :version => "1.0")
10
- @component = OpenStruct.new(:id => 6, :name => "component",
8
+ @composite = ::OpenStruct.new(:id => 2, :name => "composite")
9
+ @component_version = ::OpenStruct.new(:id => 666, :version => "1.0")
10
+ @component = ::OpenStruct.new(:id => 6, :name => "component",
11
11
  :content_view_version => @component_version)
12
- @organization = OpenStruct.new(:id => 1, :name => "great", :label => "label")
12
+ @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label")
13
13
  end
14
14
 
15
15
  def setup_org_expectations
@@ -5,18 +5,18 @@ module HammerCLIKatello
5
5
  before do
6
6
  @cmd = %w(content-view component remove)
7
7
 
8
- @component = OpenStruct.new(:id => 6, :name => "component")
9
- @component2 = OpenStruct.new(:id => 7, :name => "component2")
8
+ @component = ::OpenStruct.new(:id => 6, :name => "component")
9
+ @component2 = ::OpenStruct.new(:id => 7, :name => "component2")
10
10
 
11
- @content_view_component = OpenStruct.new(:id => 1444,
11
+ @content_view_component = ::OpenStruct.new(:id => 1444,
12
12
  :content_view => @component)
13
13
 
14
- @content_view_component2 = OpenStruct.new(:id => 1445,
14
+ @content_view_component2 = ::OpenStruct.new(:id => 1445,
15
15
  :content_view => @component2)
16
16
 
17
- @composite = OpenStruct.new(:id => 2, :name => "composite",
17
+ @composite = ::OpenStruct.new(:id => 2, :name => "composite",
18
18
  :content_view_components => [@content_view_component])
19
- @organization = OpenStruct.new(:id => 1, :name => "great", :label => "label")
19
+ @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label")
20
20
  @content_view_components = [@content_view_component, @content_view_component2]
21
21
  end
22
22
 
@@ -5,16 +5,16 @@ module HammerCLIKatello
5
5
  describe ContentViewComponent::UpdateCommand do
6
6
  before do
7
7
  @cmd = %w(content-view component update)
8
- @component_version = OpenStruct.new(:id => 666, :version => "1.0")
9
- @component = OpenStruct.new(:id => 6, :name => "component",
8
+ @component_version = ::OpenStruct.new(:id => 666, :version => "1.0")
9
+ @component = ::OpenStruct.new(:id => 6, :name => "component",
10
10
  :content_view_version => @component_version)
11
- @content_view_component = OpenStruct.new(:id => 1444,
11
+ @content_view_component = ::OpenStruct.new(:id => 1444,
12
12
  :content_view => @component,
13
13
  :content_view_version => @component_version)
14
14
 
15
- @composite = OpenStruct.new(:id => 2, :name => "composite",
15
+ @composite = ::OpenStruct.new(:id => 2, :name => "composite",
16
16
  :content_view_components => [@content_view_component])
17
- @organization = OpenStruct.new(:id => 1, :name => "great", :label => "label")
17
+ @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label")
18
18
  end
19
19
 
20
20
  def setup_org_expectations
@@ -3,10 +3,10 @@ require_relative '../test_helper'
3
3
  describe 'content-view create' do
4
4
  before do
5
5
  @cmd = %w(content-view create)
6
- @base_params = ["--organization-id=#{org_id}", "--name=#{name}"]
6
+ @base_params = ["--organization-id=#{org_id}", "--name=#{cv_name}"]
7
7
  end
8
8
  let(:error_heading) { "Could not create the content view" }
9
- let(:name) { 'test-cv' }
9
+ let(:cv_name) { 'test-cv' }
10
10
  let(:org_id) { 1 }
11
11
  let(:repositories) do
12
12
  [
@@ -22,7 +22,7 @@ describe 'content-view create' do
22
22
  params = %W(--repository-ids=#{ids.join(',')})
23
23
 
24
24
  api_expects(:content_views, :create, 'Create content view') do |par|
25
- par['name'] == name &&
25
+ par['name'] == cv_name &&
26
26
  par['repository_ids'] == ids &&
27
27
  par['organization_id'] == org_id
28
28
  end
@@ -11,20 +11,6 @@ describe HammerCLIKatello::Organization::InfoCommand do
11
11
  { "type" => 'network_sync' }
12
12
  end
13
13
 
14
- it "includes simple content access attributes" do
15
- org_id = 2
16
- params = ["--id=#{org_id}"]
17
- api_expects(:organizations, :index).returns(index_response([{'id' => org_id}]))
18
-
19
- api_expects(:organizations, :show)
20
- .with_params('id' => org_id.to_s)
21
- .returns("simple_content_access" => true, "id" => org_id,
22
- "cdn_configuration" => cdn_configuration)
23
- result = run_cmd(@cmd + params)
24
- expected = success_result(FieldMatcher.new('Simple Content Access', 'Enabled'))
25
- assert_cmd(expected, result)
26
- end
27
-
28
14
  it "includes cdn configuration attributes" do
29
15
  org_id = 2
30
16
  params = ["--id=#{org_id}"]
@@ -9,9 +9,8 @@ describe 'update an http proxy on a product' do
9
9
 
10
10
  let(:sync_response) do
11
11
  {
12
- 'id' => 1,
13
- 'state' => 'planned',
14
- 'action' => 'Update http proxy'
12
+ 'id' => '1',
13
+ 'state' => 'planned'
15
14
  }
16
15
  end
17
16
 
@@ -23,8 +22,8 @@ describe 'update an http proxy on a product' do
23
22
  ]
24
23
 
25
24
  ex = api_expects(:products_bulk_actions, :update_http_proxy, 'update an http-proxy')
26
- .with_params('ids' => '1', 'http_proxy_policy' => 'use_selected_http_proxy',
27
- 'http_proxy_id' => '1')
25
+ .with_params("ids" => [1], "http_proxy_policy" => "use_selected_http_proxy",
26
+ "http_proxy_id" => 1)
28
27
  ex.returns(sync_response)
29
28
 
30
29
  expect_foreman_task('3')
@@ -34,15 +33,10 @@ describe 'update an http proxy on a product' do
34
33
  end
35
34
 
36
35
  it 'fails with missing required params' do
37
- params = ['--proxy-id=1']
38
-
39
- ex = api_expects(:products_bulk_actions, :update_http_proxy, 'update an http-proxy')
40
- .with_params('proxy_id' => '1')
41
- ex.returns(
42
- 'proxy_id' => '1'
43
- )
44
-
36
+ params = ['--http-proxy-id=1']
37
+ api_expects_no_call
45
38
  result = run_cmd(@cmd + params)
46
- assert_equal(result.exit_code, 70)
39
+ assert(result.err[/--ids is required/],
40
+ "ids requirements must be validated")
47
41
  end
48
42
  end
@@ -0,0 +1,31 @@
1
+ require File.join(File.dirname(__FILE__), '../test_helper')
2
+
3
+ describe 'verify checksum on a product' do
4
+ include ForemanTaskHelpers
5
+
6
+ before do
7
+ @cmd = %w(product verify-checksum)
8
+ end
9
+
10
+ let(:sync_response) do
11
+ {
12
+ 'id' => '1',
13
+ 'state' => 'planned'
14
+ }
15
+ end
16
+
17
+ it 'verifies products ' do
18
+ params = [
19
+ '--ids=1'
20
+ ]
21
+
22
+ ex = api_expects(:products_bulk_actions, :verify_checksum_products, 'verify checksum')
23
+ .with_params('ids' => [1])
24
+ ex.returns(sync_response)
25
+
26
+ expect_foreman_task('3')
27
+
28
+ result = run_cmd(@cmd + params)
29
+ assert_equal(HammerCLI::EX_OK, result.exit_code)
30
+ end
31
+ end
@@ -3,18 +3,18 @@ require_relative '../test_helper'
3
3
  describe "create repository" do
4
4
  let(:org_id) { 1 }
5
5
  let(:product_id) { 2 }
6
- let(:name) { "repo1" }
6
+ let(:repo_name) { "repo1" }
7
7
  let(:content_type) { "yum" }
8
8
 
9
9
  it 'with basic options' do
10
10
  api_expects(:repositories, :create)
11
11
  .with_params(
12
- name: name,
12
+ name: repo_name,
13
13
  product_id: product_id,
14
14
  content_type: content_type)
15
15
 
16
16
  command = %W(repository create --organization-id #{org_id} --product-id #{product_id}
17
- --content-type #{content_type} --name #{name})
17
+ --content-type #{content_type} --name #{repo_name})
18
18
 
19
19
  assert_equal(0, run_cmd(command).exit_code)
20
20
  end
@@ -69,7 +69,7 @@ describe "get repository info" do
69
69
  ['Updated', '2020/08/05 15:35:36'],
70
70
  ['Content Counts', ''],
71
71
  ['Packages', '1'],
72
- ['Source RPMS', '0'],
72
+ ['SRPMs', '0'],
73
73
  ['Package Groups', '0'],
74
74
  ['Errata', '1'],
75
75
  ['Module Streams', '0']]
@@ -145,7 +145,7 @@ describe "get repository info" do
145
145
  ['Updated', '2020/08/05 15:35:36'],
146
146
  ['Content Counts', ''],
147
147
  ['Packages', '1'],
148
- ['Source RPMS', '0'],
148
+ ['SRPMs', '0'],
149
149
  ['Package Groups', '0'],
150
150
  ['Errata', '1'],
151
151
  ['Module Streams', '0']]
@@ -0,0 +1,105 @@
1
+ require_relative '../test_helper'
2
+ require_relative '../organization/organization_helpers'
3
+ require 'hammer_cli_katello/repository'
4
+ module HammerCLIKatello
5
+ describe Repository::VerifyChecksum do
6
+ include OrganizationHelpers
7
+ it 'allows minimal options' do
8
+ api_expects(:repositories, :verify_checksum) do |p|
9
+ p['id'] == 1
10
+ end
11
+ run_cmd(%w(repository verify-checksum --id 1))
12
+ end
13
+
14
+ describe 'resolves repository ID' do
15
+ it 'by requiring product' do
16
+ api_expects_no_call
17
+ result = run_cmd(%w(repository verify-checksum --name repo1))
18
+ assert(result.err[/--product, --product-id is required/], 'Incorrect error message')
19
+ end
20
+
21
+ it 'by product ID' do
22
+ ex = api_expects(:repositories, :index) do |p|
23
+ p['name'] == 'repo1' && p['product_id'] == 3
24
+ end
25
+ ex.returns(index_response([{'id' => 1}]))
26
+
27
+ api_expects(:repositories, :verify_checksum) do |p|
28
+ p['id'] == 1
29
+ end
30
+
31
+ run_cmd(%w(repository verify-checksum --name repo1 --product-id 3))
32
+ end
33
+ end
34
+
35
+ describe 'resolves product ID' do
36
+ it 'by requiring organization options' do
37
+ api_expects_no_call
38
+ result = run_cmd(%w(repository verify-checksum --name repo1 --product prod1))
39
+ assert(result.err[/--organization-id, --organization, --organization-label is required/],
40
+ "Organization option requirements must be validated")
41
+ end
42
+
43
+ it 'by organization ID' do
44
+ ex = api_expects(:products, :index) do |p|
45
+ p['name'] == 'prod3' && p['organization_id'] == '5'
46
+ end
47
+ ex.returns(index_response([{'id' => 3}]))
48
+
49
+ ex = api_expects(:repositories, :index) do |p|
50
+ p['name'] == 'repo1' && p['product_id'] == 3
51
+ end
52
+ ex.returns(index_response([{'id' => 1}]))
53
+
54
+ api_expects(:repositories, :verify_checksum) do |p|
55
+ p['id'] == 1
56
+ end
57
+
58
+ run_cmd(%w(repository verify-checksum --name repo1 --product prod3 --organization-id 5
59
+ ))
60
+ end
61
+
62
+ it 'by organization name' do
63
+ expect_organization_search('org5', 5)
64
+
65
+ ex = api_expects(:products, :index) do |p|
66
+ p['name'] == 'prod3' && p['organization_id'] == 5
67
+ end
68
+ ex.returns(index_response([{'id' => 3}]))
69
+
70
+ ex = api_expects(:repositories, :index) do |p|
71
+ p['name'] == 'repo1' && p['product_id'] == 3
72
+ end
73
+ ex.returns(index_response([{'id' => 1}]))
74
+
75
+ api_expects(:repositories, :verify_checksum) do |p|
76
+ p['id'] == 1
77
+ end
78
+
79
+ run_cmd(%w(repository verify-checksum --name repo1 --product prod3 --organization org5
80
+ ))
81
+ end
82
+
83
+ it 'by organization label' do
84
+ expect_organization_search('org5', 5, field: 'label')
85
+
86
+ ex = api_expects(:products, :index) do |p|
87
+ p['name'] == 'prod3' && p['organization_id'] == 5
88
+ end
89
+ ex.returns(index_response([{'id' => 3}]))
90
+
91
+ ex = api_expects(:repositories, :index) do |p|
92
+ p['name'] == 'repo1' && p['product_id'] == 3
93
+ end
94
+ ex.returns(index_response([{'id' => 1}]))
95
+
96
+ api_expects(:repositories, :verify_checksum) do |p|
97
+ p['id'] == 1
98
+ end
99
+
100
+ run_cmd(%w(repository verify-checksum --name repo1 --product prod3 --organization-label org5
101
+ ))
102
+ end
103
+ end
104
+ end
105
+ end