|  | 
| 30 | 30 |         '{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"}', | 
| 31 | 31 |         '],', | 
| 32 | 32 |         '"collection":[', | 
| 33 |  | -        '{"collection":"puppetcore8","version":"latest"}', | 
|  | 33 | +        '"puppetcore8"', | 
| 34 | 34 |         ']', | 
| 35 | 35 |         '}' | 
| 36 | 36 |       ].join | 
|  | 
| 63 | 63 |         '{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}', | 
| 64 | 64 |         '],', | 
| 65 | 65 |         '"collection":[', | 
| 66 |  | -        '{"collection":"puppetcore8","version":"latest"}', | 
|  | 66 | +        '"puppetcore8"', | 
| 67 | 67 |         ']', | 
| 68 | 68 |         '}' | 
| 69 | 69 |       ].join | 
|  | 
| 103 | 103 |         '{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}', | 
| 104 | 104 |         '],', | 
| 105 | 105 |         '"collection":[', | 
| 106 |  | -        '{"collection":"puppetcore8","version":"latest"}', | 
|  | 106 | +        '"puppetcore8"', | 
| 107 | 107 |         ']', | 
| 108 | 108 |         '}' | 
| 109 | 109 |       ].join | 
|  | 
| 142 | 142 |         '{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}', | 
| 143 | 143 |         '],', | 
| 144 | 144 |         '"collection":[', | 
| 145 |  | -        '{"collection":"puppetcore8","version":"latest"}', | 
|  | 145 | +        '"puppetcore8"', | 
| 146 | 146 |         ']', | 
| 147 | 147 |         '}' | 
| 148 | 148 |       ].join | 
|  | 
| 175 | 175 |         '"platforms":[', | 
| 176 | 176 |         '],', | 
| 177 | 177 |         '"collection":[', | 
| 178 |  | -        '{"collection":"puppetcore8","version":"latest"}', | 
|  | 178 | +        '"puppetcore8"', | 
| 179 | 179 |         ']', | 
| 180 | 180 |         '}' | 
| 181 | 181 |       ].join | 
|  | 
| 215 | 215 |         '{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"}', | 
| 216 | 216 |         '],', | 
| 217 | 217 |         '"collection":[', | 
| 218 |  | -        '{"collection":"puppetcore8","version":"latest"}', | 
|  | 218 | +        '"puppetcore8"', | 
| 219 | 219 |         ']', | 
| 220 | 220 |         '}' | 
| 221 | 221 |       ].join | 
|  | 
| 233 | 233 |         '::group::spec_matrix' | 
| 234 | 234 |       ) | 
| 235 | 235 |       expect(github_output_content).to include( | 
| 236 |  | -        '"collection":["2023.8.4-puppet_enterprise","2021.7.9-puppet_enterprise",{"collection":"puppetcore8","version":"latest"}' | 
|  | 236 | +        '"collection":["2023.8.4-puppet_enterprise","2021.7.9-puppet_enterprise","puppetcore8"' | 
| 237 | 237 |       ) | 
| 238 | 238 |       expect(github_output_content).to include( | 
| 239 | 239 |         'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}' | 
|  | 
| 257 | 257 |         '{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}', | 
| 258 | 258 |         '],', | 
| 259 | 259 |         '"collection":[', | 
| 260 |  | -        '{"collection":"puppetcore8-nightly","version":"latest"}', | 
|  | 260 | +        '"puppetcore8-nightly"', | 
| 261 | 261 |         ']', | 
| 262 | 262 |         '}' | 
| 263 | 263 |       ].join | 
|  | 
| 280 | 280 |       ) | 
| 281 | 281 |     end | 
| 282 | 282 |   end | 
|  | 283 | + | 
|  | 284 | +  context 'with argument --latest-agent' do | 
|  | 285 | +    let(:result) { run_matrix_from_metadata_v3(['--puppetlabs', '--latest-agent']) } | 
|  | 286 | + | 
|  | 287 | +    it 'run successfully' do | 
|  | 288 | +      expect(result.status_code).to eq 0 | 
|  | 289 | +    end | 
|  | 290 | + | 
|  | 291 | +    it 'generates the matrix' do | 
|  | 292 | +      expect(result.stdout).to include( | 
|  | 293 | +        '::warning::CentOS-6 no provisioner found', | 
|  | 294 | +        '::warning::Ubuntu-14.04 no provisioner found', | 
|  | 295 | +        '::group::matrix', | 
|  | 296 | +        '::group::spec_matrix' | 
|  | 297 | +      ) | 
|  | 298 | +      expect(github_output_content).to match(/{"collection":"puppetcore8","version":"\d+\.\d+\.\d+"}/) | 
|  | 299 | +      expect(github_output_content).to include( | 
|  | 300 | +        'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}' | 
|  | 301 | +      ) | 
|  | 302 | +    end | 
|  | 303 | +  end | 
| 283 | 304 | end | 
0 commit comments