Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
its('version') { should cmp >= minimal_lustre_client_version }
end

describe yum.repo('aws-fsx') do
it { should exist }
it { should be_enabled }
its('baseurl') { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
with_retry(retries: 3, delay: 5) do
describe yum.repo('aws-fsx') do
it { should exist }
it { should be_enabled }
its('baseurl') { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
end
end
end
end
Expand All @@ -47,10 +49,12 @@
its('version') { should cmp >= minimal_lustre_client_version }
end

describe yum.repo('aws-fsx') do
it { should exist }
it { should be_enabled }
its('baseurl') { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
with_retry(retries: 3, delay: 5) do
describe yum.repo('aws-fsx') do
it { should exist }
it { should be_enabled }
its('baseurl') { should include 'fsx-lustre-client-repo.s3.amazonaws.com' }
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Helper method to retry flaky InSpec checks
def with_retry(retries: 3, delay: 5)
attempts = 0
begin
attempts += 1
yield
rescue => e
if attempts < retries
sleep delay
retry
else
raise e
end
end
end
Loading