Skip to content

Instantly share code, notes, and snippets.

View ploubser's full-sized avatar

Pieter Loubser ploubser

View GitHub Profile
@ploubser
ploubser / gist:5859204
Created June 25, 2013 15:05
sshkey client and server configuration
#client
securityprovider = sshkey
plugin.sshkey.client.authorized_keys = /path/to/authorized_keys
#server
securityprovider = sshkey
plugin.sshkey.server.authorized_keys = /path/to/authorized_keys
release integration test
*console spam
....
build
should successfuly build the packages
should successfuly upgrade the mcollective packages
post install tests
should get an rpc ping response from all 6 nodes
should get 6 responses from mco find
should correctly apply the facts filter
(function() {
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
PuppetEnterpriseConsole.PuppetdController = (function(_super) {
__extends(PuppetdController, _super);
function PuppetdController() {
return PuppetdController.__super__.constructor.apply(this, arguments);
specdir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
require "#{specdir}/spec_helper.rb"
$TEST_FILENAME = '/x/web/LIVE/testservice/testservice.txt'
module Puppet::Parser::Functions
# Stub the function by creating a new one
newfunction(:appconfig_lookup, :type => :rvalue) do |args|
return {"hello" => "world"}
require 'facter/lsb'
f = File.open('/tmp/file', 'a')
Facter.add(:operatingsystem) do
confine :kernel => :sunos
setcode do "Solaris" end
end
Facter.add(:operatingsystem) do
confine :kernel => :linux
# Working Tests
before(:each) do
Puppet::Parser::Functions.autoloader.loadall
mock_puppet_function(:appconfig_lookup).stubs(:call).returns({'hello' => 'world'})
end
# Vs old setup
before(:all) do
class RoundedQueue
attr_accessor :index
def initialize(base = [])
@queue = base
@index = 0
end
def get
DDL
metadata :name => "rabbitmq",
:description => "RabbitMQ connector",
:author => "P. Loubser <pieter.loubser@puppetlabs.com>",
:license => "ASL 2.0",
:version => "1.0",
:url => "http://marionette-collective.org/",
:timeout => 1
1] MCDB(main)> call :test, :test, {:ivalue => "foobar"}
debug 2013/02/05 22:44:49: pluginmanager.rb:167:in `loadclass' Loading MCollective::Agent::Test from mcollective/agent/test.rb
debug 2013/02/05 22:44:49: pluginmanager.rb:44:in `<<' Registering plugin test_agent with class MCollective::Agent::Test single_instance: true
debug 2013/02/05 22:44:49: pluginmanager.rb:80:in `[]' Returning new plugin test_agent with class MCollective::Agent::Test
debug 2013/02/05 22:44:49: cache.rb:117:in `ttl' Cache miss on 'ddl' key 'agent/test'
debug 2013/02/05 22:44:49: base.rb:93:in `findddlfile' Found test ddl at ./mcollective/agent/test.ddl
debug 2013/02/05 22:44:49: pluginmanager.rb:80:in `[]' Returning new plugin connector_plugin with class NoopConnector
debug 2013/02/05 22:44:49: pluginmanager.rb:167:in `loadclass' Loading MCollective::Validator::Any_validator from mcollective/validator/any_validator.rb
debug 2013/02/05 22:44:49: pluginmanager.rb:167:in `loadclass' Loading MCollective::Validator::Array_validator from
[psy@centos6 mcollective-process-agent]$ mco process list bash
* [ ============================================================> ] 2 / 2
centos6.vm
COMMAND VSZ PID USER TTY RSS STATE
-bash 107.105 MB 1563 psy 1025 829.000 KB S
-bash 107.961 MB 1635 psy 34816 1.047 MB S
-bash 107.105 MB 13328 psy 34818 844.000 KB S