Skip to content

Commit

Permalink
Merge pull request #557 from h0tw1r3/fix-test
Browse files Browse the repository at this point in the history
(maint) fix broken matrix tests
  • Loading branch information
jordanbreen28 authored Apr 29, 2024
2 parents fa7efa5 + 7c692c0 commit 55f7d1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/exe/matrix_from_metadata_v2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
end

it 'generates the matrix' do # rubocop:disable RSpec/ExampleLength
expect(result.stdout).to include('::warning::Cannot find image for CentOS-6')
expect(result.stdout).to include('::warning::Cannot find image for Ubuntu-14.04')
expect(github_output_content).to include(
[
'matrix={',
'"platforms":[',
'{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"},',
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
Expand All @@ -39,7 +39,7 @@
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
expect(result.stdout).to include("Created matrix with 16 cells:\n - Acceptance Test Cells: 14\n - Spec Test Cells: 2")
expect(result.stdout).to include("Created matrix with 14 cells:\n - Acceptance Test Cells: 12\n - Spec Test Cells: 2")
end
end

Expand All @@ -57,13 +57,13 @@
end

it 'generates the matrix without excluded platforms' do # rubocop:disable RSpec/ExampleLength
expect(result.stdout).to include('::warning::Cannot find image for CentOS-6')
expect(result.stdout).to include('::warning::Cannot find image for Ubuntu-14.04')
expect(result.stdout).to include('::warning::Ubuntu-18.04 was excluded from testing')
expect(github_output_content).to include(
[
'matrix={',
'"platforms":[',
'{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"},',
'{"label":"RedHat-8","provider":"provision_service","image":"rhel-8"},',
'{"label":"RedHat-9","provider":"provision_service","image":"rhel-9"},',
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
Expand All @@ -79,7 +79,7 @@
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
expect(result.stdout).to include("Created matrix with 14 cells:\n - Acceptance Test Cells: 12\n - Spec Test Cells: 2")
expect(result.stdout).to include("Created matrix with 12 cells:\n - Acceptance Test Cells: 10\n - Spec Test Cells: 2")
end
end

Expand All @@ -98,14 +98,14 @@

it 'generates the matrix without excluded platforms' do
expect(result.stdout).to include('::warning::Cannot find image for Ubuntu-14.04')
expect(result.stdout).to include('::warning::Cannot find image for CentOS-6')
expect(result.stdout).to include('::warning::Ubuntu-18.04 was excluded from testing')
expect(result.stdout).to include('::warning::Ubuntu-22.04 was excluded from testing')
expect(result.stdout).to include('::warning::RedHat-8 was excluded from testing')
expect(github_output_content).to include(
[
'matrix={',
'"platforms":[',
'{"label":"CentOS-6","provider":"docker","image":"litmusimage/centos:6"},',
'{"label":"RedHat-9-arm","provider":"provision_service","image":"rhel-9-arm64"},',
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","image":"ubuntu-2204-lts-arm64"}',
'],',
Expand All @@ -118,7 +118,7 @@
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
expect(result.stdout).to include("Created matrix with 8 cells:\n - Acceptance Test Cells: 6\n - Spec Test Cells: 2")
expect(result.stdout).to include("Created matrix with 6 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 2")
end
end
end

0 comments on commit 55f7d1f

Please sign in to comment.