This repository has been archived by the owner on Jun 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
810 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Aix | ||
module Identity | ||
class Gid | ||
FACT_NAME = 'identity.gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Aix | ||
module Identity | ||
class Group | ||
FACT_NAME = 'identity.group' | ||
ALIASES = 'gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:group) | ||
|
||
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)] | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Aix | ||
module Identity | ||
class Privileged | ||
FACT_NAME = 'identity.privileged' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Aix | ||
module Identity | ||
class Uid | ||
FACT_NAME = 'identity.uid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Debian | ||
module Identity | ||
class Gid | ||
FACT_NAME = 'identity.gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Debian | ||
module Identity | ||
class Group | ||
FACT_NAME = 'identity.group' | ||
ALIASES = 'gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:group) | ||
|
||
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)] | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Debian | ||
module Identity | ||
class Privileged | ||
FACT_NAME = 'identity.privileged' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Debian | ||
module Identity | ||
class Uid | ||
FACT_NAME = 'identity.uid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module El | ||
module Identity | ||
class Gid | ||
FACT_NAME = 'identity.gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module El | ||
module Identity | ||
class Group | ||
FACT_NAME = 'identity.group' | ||
ALIASES = 'gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:group) | ||
|
||
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)] | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module El | ||
module Identity | ||
class Privileged | ||
FACT_NAME = 'identity.privileged' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module El | ||
module Identity | ||
class Uid | ||
FACT_NAME = 'identity.uid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Sles | ||
module Identity | ||
class Gid | ||
FACT_NAME = 'identity.gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Sles | ||
module Identity | ||
class Group | ||
FACT_NAME = 'identity.group' | ||
ALIASES = 'gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:group) | ||
|
||
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)] | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Sles | ||
module Identity | ||
class Privileged | ||
FACT_NAME = 'identity.privileged' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Sles | ||
module Identity | ||
class Uid | ||
FACT_NAME = 'identity.uid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Solaris | ||
module Identity | ||
class Gid | ||
FACT_NAME = 'identity.gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Solaris | ||
module Identity | ||
class Group | ||
FACT_NAME = 'identity.group' | ||
ALIASES = 'gid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:group) | ||
|
||
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)] | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Solaris | ||
module Identity | ||
class Privileged | ||
FACT_NAME = 'identity.privileged' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module Facts | ||
module Solaris | ||
module Identity | ||
class Uid | ||
FACT_NAME = 'identity.uid' | ||
|
||
def call_the_resolver | ||
fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid) | ||
Facter::ResolvedFact.new(FACT_NAME, fact_value) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
describe Facts::Aix::Identity::Gid do | ||
describe '#call_the_resolver' do | ||
subject(:fact) { Facts::Aix::Identity::Gid.new } | ||
|
||
let(:value) { '20' } | ||
|
||
before do | ||
allow(Facter::Resolvers::PosxIdentity).to receive(:resolve).with(:gid).and_return(value) | ||
end | ||
|
||
it 'calls Facter::Resolvers::PosxIdentity' do | ||
fact.call_the_resolver | ||
expect(Facter::Resolvers::PosxIdentity).to have_received(:resolve).with(:gid) | ||
end | ||
|
||
it 'returns a fact' do | ||
expect(fact.call_the_resolver).to be_an_instance_of(Facter::ResolvedFact).and \ | ||
have_attributes(name: 'identity.gid', value: value) | ||
end | ||
end | ||
end |
Oops, something went wrong.