Skip to content

Instantly share code, notes, and snippets.

View raphink's full-sized avatar
🐝
eBPF everything!

Raphaël Pinson raphink

🐝
eBPF everything!
View GitHub Profile
module PuppetSpecReport
def status= (status)
@status = status
end
end
class Puppet::Transaction::Report::RestSpec < Puppet::Transaction::Report::Rest
def save(request)
$ RUBYLIB=/home/rpinson/dev/serverspec/lib/ rspec --color --format d
ssh
should be installed
should be enabled
should be running
port 22
should be listening
require 'puppet'
require 'puppet/type/user'
resource = Puppet::Type::User.new(:name => 'rpinson', :uid => '1502')
# resource = Puppet::Type::Exec.new(:name => '/bin/test', :unless => '/bin/true')
# resource = Puppet::Type::Service.new(:name => 'ssh', :ensure => 'running', :enable => 'false')
# Ensurable
if resource.provider.respond_to?(:exists?) and ! resource.provider.exists?
return false
require 'timeout'
require 'open-uri'
def cache
'/var/tmp/public_ip.fact.cache'
end
def can_connect? (wait_sec=2, url)
Timeout::timeout(wait_sec) { open(url) }
return true
info: Retrieving plugin
err: Could not retrieve catalog from remote server: Unit tests failed:
.FF.F
Failures:
1) puppet
Failure/Error: it { should contain_package('ppet') }
expected that the catalogue would contain Package[ppet]
# /var/lib/puppet/spec/class/puppet__client__base/puppet_package_spec.rb:4
require 'serverspec'
require 'pathname'
require 'open3'
module ExecHelper
def ssh_exec(cmd, opts={})
stdin, stdout, stderr = Open3.popen3(cmd)
{ :stdout => stdout.gets, :stderr => stderr.gets, :exit_code => $?.to_i, :exit_signal => nil }
end
end
require 'catalog'
describe 'package' do
subject { Catalog.instance }
# subject { YAML.load_file('/tmp/catalog') }
it { should contain_package('augeas') }
it { should contain_package('augeas-lenses') }
it { should contain_package('augeas-tools') }
end
# /var/lib/puppet/spec/class/wrk4.wrk.cby.camptocamp.com/fail_spec.rb
describe 'failure' do
it { 2.should == 3 }
end
$ otfinfo -f /usr/local/share/fonts/libertine/LinLibertine_R.otf
aalt Access All Alternates
c2sc Small Capitals From Capitals
case Case-Sensitive Forms
ccmp Glyph Composition/Decomposition
cpsp Capital Spacing
dlig Discretionary Ligatures
fina Terminal Forms
frac Fractions
hlig Historical Ligatures
\documentclass{article}
\usepackage{bibleref}
\usepackage{biblequote}
\begin{document}
As it is said in \bibleverse{Jn}(3:16-17):
\begin{quote}
\versequote{Jn}{3:16-17}{KJV}