Skip to content

Commit

Permalink
feat(spec): update specs with removed gpg keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Pythyu committed Aug 14, 2024
1 parent 0789894 commit 87101a1
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions spec/repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,18 @@ def set_yum_repo_and_gnupg(key, install_gnupg)

# Key B01082D3 (from 2023-04-20 to 2028-04-18)
# Key FD4BF915 (from 2020-09-08 to 2024-09-07)
# Key E09422B3
import_gpg_keys(
%w[current 4f09d16b b01082d3 fd4bf915 e09422b3]
%w[current 4f09d16b b01082d3 fd4bf915]
)

# prefer HTTPS on boxes that support TLS1.2
it 'sets up a yum repo E09422B3, FD4BF915 and B01082D3' do
it 'sets up a yum repo FD4BF915 and B01082D3' do
expect(chef_run).to create_yum_repository('datadog').with(
gpgkey: [
'https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public',
]
).with(repo_gpgcheck: true)
end
Expand All @@ -218,12 +216,10 @@ def set_yum_repo_and_gnupg(key, install_gnupg)

# Key B01082D3 (from 2023-04-20 to 2028-04-18)
# Key FD4BF915 (from 2020-09-08 to 2024-09-07)
# Key E09422B3
import_gpg_keys([
'4f09d16b',
'b01082d3',
'fd4bf915',
'e09422b3'
])

# prefer HTTPS on boxes that support TLS1.2
Expand All @@ -234,7 +230,6 @@ def set_yum_repo_and_gnupg(key, install_gnupg)
'https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public',
]
).with(repo_gpgcheck: true)
end
Expand All @@ -251,12 +246,10 @@ def set_yum_repo_and_gnupg(key, install_gnupg)

# Key B01082D3 (from 2023-04-20 to 2028-04-18)
# Key FD4BF915 (from 2020-09-08 to 2024-09-07)
# Key E09422B3
import_gpg_keys([
'4f09d16b',
'b01082d3',
'fd4bf915',
'e09422b3'
])

# RHEL5 has to use insecure HTTP due to lack of support for TLS1.2
Expand All @@ -268,7 +261,6 @@ def set_yum_repo_and_gnupg(key, install_gnupg)
'http://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public',
'http://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public',
'http://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public',
'http://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public',
]
).with(repo_gpgcheck: false)
end
Expand All @@ -291,7 +283,6 @@ def set_yum_repo_and_gnupg(key, install_gnupg)
'https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public',
]
).with(repo_gpgcheck: false)
end
Expand All @@ -314,7 +305,6 @@ def set_yum_repo_and_gnupg(key, install_gnupg)
'https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public',
]
).with(repo_gpgcheck: true)
end
Expand All @@ -337,7 +327,6 @@ def set_yum_repo_and_gnupg(key, install_gnupg)
'https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public',
]
).with(repo_gpgcheck: true)
end
Expand All @@ -360,7 +349,6 @@ def set_yum_repo_and_gnupg(key, install_gnupg)
'https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public',
'https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public',
]
).with(repo_gpgcheck: true)
end
Expand All @@ -385,7 +373,6 @@ def set_yum_repo_and_gnupg(key, install_gnupg)
'4f09d16b',
'b01082d3',
'fd4bf915',
'e09422b3'
], false)

it 'deletes the old RPM GPG key 4172a230 if it exists' do
Expand Down

0 comments on commit 87101a1

Please sign in to comment.