Procházet zdrojové kódy

Add Kitchen test

tags/v0.2.0
Nicolas Rodriguez před 7 roky
rodič
revize
f049385b18
6 změnil soubory, kde provedl 91 přidání a 0 odebrání
  1. +2
    -0
      .gitignore
  2. +49
    -0
      .kitchen.yml
  3. +15
    -0
      .travis.yml
  4. +8
    -0
      Gemfile
  5. +7
    -0
      test/integration/syslog_ng/controls/syslog_ng.rb
  6. +10
    -0
      test/integration/syslog_ng/inspec.yml

+ 2
- 0
.gitignore Zobrazit soubor

@@ -0,0 +1,2 @@
.kitchen/
Gemfile.lock

+ 49
- 0
.kitchen.yml Zobrazit soubor

@@ -0,0 +1,49 @@
<%
distrib, infos = ENV.fetch('DISTRIB', 'debian:stretch/9').split(':')
codename, version = infos.split('/')
%>
---
driver:
name: docker
use_sudo: false

provisioner:
name: salt_solo
formula: syslog_ng

# Install Salt from official repositories
salt_install: apt
salt_version: latest
salt_apt_repo: http://repo.saltstack.com/apt/<%= distrib %>/<%= version %>/amd64
salt_apt_repo_key: http://repo.saltstack.com/apt/<%= distrib %>/<%= version %>/amd64/latest/SALTSTACK-GPG-KEY.pub

# Don't install Chef
require_chef: false

# Configure Salt
state_top:
base:
'*':
- syslog_ng.config

pillars:
top.sls:
base:
'*':
- syslog_ng
syslog_ng.sls:
syslog_ng:
foo: bar

platforms:
- name: <%= distrib %>-<%= codename %>
driver_config:
image: "<%= distrib %>:<%= codename %>"
platform: <%= distrib %>

verifier:
name: inspec
format: progress

suites:
- name: syslog_ng

+ 15
- 0
.travis.yml Zobrazit soubor

@@ -0,0 +1,15 @@
language: ruby
sudo: required
cache: bundler
rvm:
- 2.3.4
services:
- docker
script:
- bundle exec kitchen test
env:
matrix:
- DISTRIB=debian:wheezy/7
- DISTRIB=debian:jessie/8
- DISTRIB=debian:stretch/9
- DISTRIB=ubuntu:xenial/16.04

+ 8
- 0
Gemfile Zobrazit soubor

@@ -0,0 +1,8 @@
source 'https://rubygems.org'
ruby '2.3.4'

gem 'test-kitchen'
gem 'kitchen-docker'
gem 'kitchen-salt'
gem 'kitchen-inspec'
gem 'rake'

+ 7
- 0
test/integration/syslog_ng/controls/syslog_ng.rb Zobrazit soubor

@@ -0,0 +1,7 @@
# encoding: utf-8

title 'Test SyslogNG installation'

describe package('syslog-ng') do
it { should be_installed }
end

+ 10
- 0
test/integration/syslog_ng/inspec.yml Zobrazit soubor

@@ -0,0 +1,10 @@
name: syslog_ng
title: SyslogNG Profile
maintainer: Nicolas Rodriguez
copyright: Nicolas Rodriguez
copyright_email: nicoladmin@free.fr
license: MIT
summary: SyslogNG Compliance Profile
version: 0.1.0
supports:
- os-name: debian

Načítá se…
Zrušit
Uložit