|
3 | 3 |
|
4 | 4 | module InsightsCloud::Api
|
5 | 5 | class MachineTelemetriesControllerTest < ActionController::TestCase
|
| 6 | + include KatelloCVEHelper |
| 7 | + |
6 | 8 | setup do
|
7 | 9 | FactoryBot.create(:common_parameter, name: InsightsCloud.enable_client_param, key_type: 'boolean', value: true)
|
8 | 10 | end
|
@@ -122,29 +124,17 @@ class MachineTelemetriesControllerTest < ActionController::TestCase
|
122 | 124 | setup do
|
123 | 125 | UpstreamOnlySettingsTestHelper.set_if_available('allow_multiple_content_views')
|
124 | 126 | User.current = User.find_by(login: 'secret_admin')
|
125 |
| - |
126 |
| - @env = FactoryBot.create(:katello_k_t_environment) |
127 |
| - @env2 = FactoryBot.create(:katello_k_t_environment, organization: @env.organization) |
| 127 | + env = FactoryBot.create(:katello_k_t_environment) |
| 128 | + env2 = FactoryBot.create(:katello_k_t_environment, organization: env.organization) |
128 | 129 |
|
129 | 130 | @host = FactoryBot.create(
|
130 | 131 | :host,
|
131 | 132 | :with_subscription,
|
132 | 133 | :with_content,
|
133 | 134 | :with_hostgroup,
|
134 | 135 | :with_parameter,
|
135 |
| - content_view_environments: [ |
136 |
| - FactoryBot.create( |
137 |
| - :katello_content_view_environment, |
138 |
| - content_view: FactoryBot.create(:katello_content_view, organization: @env.organization), |
139 |
| - lifecycle_environment: @env |
140 |
| - ), |
141 |
| - FactoryBot.create( |
142 |
| - :katello_content_view_environment, |
143 |
| - content_view: FactoryBot.create(:katello_content_view, organization: @env.organization), |
144 |
| - lifecycle_environment: @env2 |
145 |
| - ), |
146 |
| - ], |
147 |
| - organization: @env.organization |
| 136 | + content_view_environments: [make_cve(lifecycle_environment: env), make_cve(lifecycle_environment: env2)], |
| 137 | + organization: env.organization |
148 | 138 | )
|
149 | 139 |
|
150 | 140 | @host.subscription_facet.pools << FactoryBot.create(:katello_pool, account_number: '5678', cp_id: 1)
|
|
0 commit comments