Skip to content

Instantly share code, notes, and snippets.

@bschonec
Last active March 27, 2023 14:01
Show Gist options
  • Save bschonec/af128ff4012d5602b7ac34b8b17cbbc9 to your computer and use it in GitHub Desktop.
Save bschonec/af128ff4012d5602b7ac34b8b17cbbc9 to your computer and use it in GitHub Desktop.
hostnames = {
'server-01t.example.com' => { lane: 't'},
'server-02q.example.com' => { lane: 'q'},
'server-03u.example.com' => { lane: 'u'},
'server-04p.example.com' => { lane: 'p'},
}
long_lanes = { t: 'test', q: 'qua', u: 'uat', p: 'production'}
hostnames.each do |hostname, data|
expect(Facter.fact(:application).value).to include(
'lane' => data[:lane],
'long_lane' => long_lanes[data[:lane]], <<<<< --- This doesn't work.
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment