(BUGFIX) Update values to correctly reflect what is expected #80
Annotations
2 errors
Run tests:
spec/classes/motd_spec.rb#L44
motd On Linux when neither template or source are specified is expected to contain File[/etc/motd] with ensure => "file", backup => "false", content =~ /RedHat\s9\.3\sx86_64\n\nFQDN:\s*foo.example.com\s\((172\.16\.254\.254|10\.109\.1\.2)\)\nProcessor:\s*Intel\sXeon\sProcessor\s\(Cascadelake\)\nKernel:\s*Linux\nMemory\sSize:\s*1.44\sGiB/, owner => "root", group => "root" and mode => "0644"
Failure/Error:
expect(subject).to contain_File('/etc/motd').with(
ensure: 'file', backup: 'false',
# The following Regex checks for the matching content in this comment and allows for two different IP values to be matched after foo.example.com. This is a workaround to ensure that PDK
# integration testing passes while the MOTD unit tests dont break. The string we are looking for is:
# "RedHat 9.0 x86_64\n\nFQDN: foo.example.com (172.16.254.254 OR 10.109.1.2)\nProcessor: Intel Xeon Processor (Cascadelake)\nKernel: Linux\nMemory Size: 3.10 GiB\n",
content: %r{RedHat\s9\.3\sx86_64\n\nFQDN:\s*foo.example.com\s\((172\.16\.254\.254|10\.109\.1\.2)\)\nProcessor:\s*Intel\sXeon\sProcessor\s\(Cascadelake\)\nKernel:\s*Linux\nMemory\sSize:\s*1.44\sGiB}, # rubocop:disable Layout/LineLength
owner: 'root', group: 'root', mode: '0644'
)
expected that the catalogue would contain File[/etc/motd] with content set to /RedHat\s9\.3\sx86_64\n\nFQDN:\s*foo.example.com\s\((172\.16\.254\.254|10\.109\.1\.2)\)\nProcessor:\s*Intel\sXeon\sProcessor\s\(Cascadelake\)\nKernel:\s*Linux\nMemory\sSize:\s*1.44\sGiB/ but it is set to "RedHat 9.3 x86_64\n\nFQDN: foo.example.com (172.16.254.254)\nProcessor: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz\nKernel: Linux\nMemory Size: 1.44 GiB\n"
Diff:
@@ -1,6 +1,11 @@
-(?-mix:RedHat\s9\.3\sx86_64\n\nFQDN:\s*foo.example.com\s\((172\.16\.254\.254|10\.109\.1\.2)\)\nProcessor:\s*Intel\sXeon\sProcessor\s\(Cascadelake\)\nKernel:\s*Linux\nMemory\sSize:\s*1.44\sGiB)
+RedHat 9.3 x86_64
+
+FQDN: foo.example.com (172.16.254.254)
+Processor: Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
+Kernel: Linux
+Memory Size: 1.44 GiB
|
Run tests
Process completed with exit code 1.
|
Loading