Skip to content
Merged
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
10 changes: 8 additions & 2 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- '2.3'
- '2.7'
- '3.0'
- '3.1'
- '3.2.0-preview2'
- 'jruby-9.3.7.0'
runs-on: ubuntu-latest
steps:
Expand All @@ -38,6 +38,12 @@ jobs:
- run: bundle exec rake spec_integration

windows_unit_tests:
name: Windows tests with Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '2.7'
- '3.1'
runs-on: windows-2019
steps:
- name: Checkout current PR
Expand All @@ -46,7 +52,7 @@ jobs:
- name: Rspec checks
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: ${{ matrix.ruby }}
- run: gem update bundler
- run: bundle install --jobs 3 --retry 3
- run: bundle exec rake spec_random
Expand Down
1 change: 1 addition & 0 deletions lib/facter/util/linux/socket_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def mac_from(ifaddr)
end
rescue StandardError => e
@log.debug("Could not read mac for interface #{ifaddr.name}, got #{e}")
nil
end

def mac_from_sockaddr_of(ifaddr)
Expand Down
2 changes: 1 addition & 1 deletion spec/custom_facts/util/directory_loader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
it "does nothing bad when dir doesn't exist" do
fakepath = '/foobar/path'
my_loader = LegacyFacter::Util::DirectoryLoader.new(fakepath)
allow(FileTest).to receive(:exists?).with(my_loader.directories[0]).and_return(false)
allow(FileTest).to receive(:exist?).with(my_loader.directories[0]).and_return(false)
expect { my_loader.load(collection) }.not_to raise_error
end

Expand Down
1 change: 1 addition & 0 deletions spec/custom_facts/util/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ def expects_to_parse_powershell(cmd, result)
let(:yaml_content) { load_fixture('external_fact_yaml_date').read }

it 'loads date' do
pending 'There is a bug in newer versions of Psych and Timecop' if RUBY_VERSION =~ /^3\.2/
expected_result = { 'testsfact' => { 'date' => Date.parse('2020-04-28') } }

expect(yaml_parser.parse_results).to eq(expected_result)
Expand Down