Page MenuHomePhabricator
Paste P17818

(An Untitled Masterwork)
ActivePublic

Authored by jcrespo on Wed, Nov 24, 3:16 PM.
puppet/modules/wmflib$ RUBYOPT=-W0 bundle2.7 exec rake spec
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
/usr/bin/ruby2.7 -I/media/home/jynus/puppet/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib:/media/home/jynus/puppet/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.10.3/lib /media/home/jynus/puppet/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\{aliases,classes,defines,functions,hosts,integration,plans,tasks,type_aliases,types,unit\}/\*\*/\*_spec.rb
ensure_mounted
should exist
should raise a ParseError if there are less than 1 arguments
should raise a ParseError if there are more than 1 arguments
should return 'mounted' for param 'present'
should return 'mounted' for param 'true'
should return 'absent' for param 'absent'
should return 'false' for param 'false'
init_template
correctly renders the template
ipresolve
should resolve ipv4 addresses by default
should resolve ipv4 addresses when explicitly asked to
should resolve ipv6 addresses
should be able to perform a reverse DNS lookup
fails when resolving an inexistent name
role
should be called with one parameter
throws error if called on a non-existing role
includes the role class
adds the keys to the top-scope variables
function has already been called
raises an error when called more than once in a scope
secret
should throw an error if the file is not existent
should run correctly with a good filename
should throw an error if the number of arguments is wrong
wmflib::dir::mkdir_p
with '/'
with '/etc'
with '/etc/foo'
with '/etc/foo/'
with '/etc/foo', '/foo'
with '/etc/foo', '/foo' and custom params
with '/etc/foo', '/etc/bar/' and custom params
with '/etc/foo', '//etc/bar' and custom params
wmflib::dir::normalise
is expected to run wmflib::dir::normalise("/") and return ["/"]
is expected to run wmflib::dir::normalise("/etc") and return ["/etc"]
is expected to run wmflib::dir::normalise("/etc/") and return ["/etc"]
is expected to run wmflib::dir::normalise(["/etc/foo/", "/foo"]) and return ["/etc/foo", "/foo"]
wmflib::dir::split
is expected to run wmflib::dir::split("/") and return []
is expected to run wmflib::dir::split("/etc") and return ["/etc"]
is expected to run wmflib::dir::split("/etc/foo") and return ["/etc", "/etc/foo"]
is expected to run wmflib::dir::split(["/etc/foo", "/foo"]) and return ["/etc", "/etc/foo", "/foo"]
wmflib::inject_secret
existing secret
inject
is expected to run wmflib::inject_secret("secret(test)") and return "Secret test found!"
noop
is expected to run wmflib::inject_secret("secret(malformed") and return "secret(malformed"
mixed
is expected to run wmflib::inject_secret({:a=>[1, 2, true, "secret(test)"], :b=>"secret(test2)"}) and return {:a=>[1, 2, true, "Secret test found!"], :b=>"Secret test2 found!"}
inexistent secret
is expected to run wmflib::inject_secret("secret(test)") and raise an ArgumentError
wmflib::secret
should throw an error if the file is not existent
should run correctly with a good filename
should run correctly with a good filename (setting binary: false)
should run correctly with a good filename (setting binary: true)
should throw an error if the second argument not binary
Wmflib::Email
valid handling
"email@example.com"
is expected to match value "email@example.com"
"EMAIL@example.com"
is expected to match value "EMAIL@example.com"
"email@EXAMPLE.com"
is expected to match value "email@EXAMPLE.com"
"email@192.0.2.1"
is expected to match value "email@192.0.2.1"
"_______@example.com"
is expected to match value "_______@example.com"
"firstname.lastname@example.com"
is expected to match value "firstname.lastname@example.com"
"firstname+lastname@example.com"
is expected to match value "firstname+lastname@example.com"
"firstname-lastname@example.com"
is expected to match value "firstname-lastname@example.com"
"1234567890@example.com"
is expected to match value "1234567890@example.com"
"email@subdomain.example.com"
is expected to match value "email@subdomain.example.com"
"email@example-one.com"
is expected to match value "email@example-one.com"
"email@example.name"
is expected to match value "email@example.name"
"email@example.museum"
is expected to match value "email@example.museum"
"email@example.co.jp"
is expected to match value "email@example.co.jp"
"email@example"
is expected to match value "email@example"
"user@example.1234"
is expected to match value "user@example.1234"
"user@a"
is expected to match value "user@a"
invalid handling
"plainaddress"
is expected not to match value "plainaddress"
"\#@%^%\#$@\#$@#.com"
is expected not to match value "\#@%^%\#$@\#$@#.com"
"@example.com"
is expected not to match value "@example.com"
" email@example.com"
is expected not to match value " email@example.com"
"email@example.com "
is expected not to match value "email@example.com "
"email@example.com\t"
is expected not to match value "email@example.com\t"
"user email@example.com"
is expected not to match value "user email@example.com"
"useremail@example com"
is expected not to match value "useremail@example com"
"user,email@example.com"
is expected not to match value "user,email@example.com"
"useremail@example,com"
is expected not to match value "useremail@example,com"
"useremail@."
is expected not to match value "useremail@."
"useremail@.example.org"
is expected not to match value "useremail@.example.org"
"useremail@a......"
is expected not to match value "useremail@a......"
"useràexample.com"
is expected not to match value "useràexample.com"
"Joe Smith <email@example.com>"
is expected not to match value "Joe Smith <email@example.com>"
"email.example.com"
is expected not to match value "email.example.com"
"email@example@example.com"
is expected not to match value "email@example@example.com"
"あいうえお@example.com"
is expected not to match value "あいうえお@example.com"
"email@example.com (Joe Smith)"
is expected not to match value "email@example.com (Joe Smith)"
"email@-example.com"
is expected not to match value "email@-example.com"
"email@example..com"
is expected not to match value "email@example..com"
"”(),:;<>[\\]@example.com"
is expected not to match value "”(),:;<>[\\]@example.com"
"just”not”right@example.com"
is expected not to match value "just”not”right@example.com"
"this\\ is\"really\"not\\allowed@example.com"
is expected not to match value "this\\ is\"really\"not\\allowed@example.com"
Wmflib::Host::Wildcard
valid handling
"en.wikipedia.org"
is expected to match value "en.wikipedia.org"
"*.wikipedia.org"
is expected to match value "*.wikipedia.org"
invalid handling
"ww*.wikipedia.org"
is expected not to match value "ww*.wikipedia.org"
"*e.wikipedia.org"
is expected not to match value "*e.wikipedia.org"
#<Facter::Util::Fact:0x000055e817e13048>
cpu_details
is expected to eq "3a"
is expected to eq "6"
is expected to eq ["cpu_meltdown", "spectre_v1", "spectre_v2", "spec_store_bypass", "l1tf", "mds", "swapgs", "itlb_multihit"]
is expected to eq ["fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", "sep", "mtrr", "pge", "mca", "...lahf_lm", "pti", "ssbd", "ibrs", "ibpb", "fsgsbase", "smep", "erms", "xsaveopt", "arat", "md_clear"]
Finished in 2.57 seconds (files took 0.47366 seconds to load)
95 examples, 0 failures