1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic.git synced 2024-12-11 23:41:32 +01:00

Removing broken molecule test

This commit is contained in:
L3D 2022-11-06 20:30:48 +01:00
parent 8ae48c1caa
commit 0935f2248b
Signed by: l3d
GPG key ID: CD08445BFF4313D1
9 changed files with 3 additions and 218 deletions

View file

@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'checkout git repo'
uses: actions/checkout@v3
- name: Lint Ansible Playbook
- name: 'Lint Ansible Playbook'
uses: ansible/ansible-lint-action@v6
with:
targets: "."
args: ""

View file

@ -1,59 +0,0 @@
---
name: 🎭 Tests
# yamllint disable-line rule:truthy
on:
push:
paths:
- defaults/**
- handlers/**
- meta/**
- molecule/**
- tasks/**
- templates/**
- vars/**
- .github/**
pull_request:
branches:
- main
jobs:
lint:
name: 📝 Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter@v4.9.4
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_ANSIBLE: true
ANSIBLE_DIRECTORY: './'
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
molecule:
name: 🧪 Molecule test
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- ubuntu1804
- ubuntu2004
- ubuntu2204
- debian9
- debian10
- debian11
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@4.0.9
env:
MOLECULE_DISTRO: ${{ matrix.distro }}
with:
image: ubuntu

View file

@ -1,26 +0,0 @@
---
dependency:
name: galaxy
driver:
name: docker
# lint: |
# set -e
# yamllint .
platforms:
- name: instance
image: 'geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest'
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
provisioner:
name: ansible
# lint:
# name: ansible-lint
playbooks:
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
scenario:
name: default
verifier:
name: ansible

View file

@ -1,59 +0,0 @@
---
- name: Converge
hosts: all
roles:
- {role: ansible_role_restic}
pre_tasks:
- name: install bzip2
package:
name: bzip2
state: present
vars:
restic_download_path: ~/restic
restic_install_path: ~/restic
restic_repos:
local:
location: /backup
password: securepassword1
init: true
restic_backups:
- name: test
src: /home
repo: local
keep_last: 4
keep_tag: deployment
- name: test_stdin
repo: local
stdin: true
stdin_cmd: echo "this comes from stdin"
stdin_filename: stdin.txt
keep_last: 2
keep_hourly: 24
keep_daily: 7
keep_monthly: 12
keep_yearly: 5
- name: Converge with dict
hosts: all
roles:
- role: ansible_role_restic
pre_tasks:
- name: install bzip2
package:
name: bzip2
state: present
vars:
restic_download_path: ~/restic
restic_install_path: ~/restic
restic_repos:
local:
location: /backup
password: securepassword1
init: true
restic_backups:
dicttest:
name: dicttest
src: /home
repo: local
keep_last: 4
keep_tag: deployment

View file

@ -1,9 +0,0 @@
---
- name: "include tasks for testing backup files"
include_tasks: "test_backup_files.yml"
- name: "include tasks for testing access files"
include_tasks: "test_access_files.yml"
- name: "include tasks for testing restic link"
include_tasks: "test_restic_link.yml"

View file

@ -1,18 +0,0 @@
---
- name: Stat test access file
stat:
path: /opt/restic/access-test.sh
register: test_file
- name: Check that the test access file exists
assert:
that:
- test_file.stat.exists
- name: Stat test_stdin access file
stat:
path: /opt/restic/access-test_stdin.sh
register: test_stdin_file
- name: Check that the test_stdin access file exists
assert:
that:
- test_stdin_file.stat.exists

View file

@ -1,27 +0,0 @@
---
- name: Stat test backup file
stat:
path: /opt/restic/backup-test.sh
register: test_file
- name: Check that the test backup file exists
assert:
that:
- test_file.stat.exists
- name: Stat test_stdin backup file
stat:
path: /opt/restic/backup-test_stdin.sh
register: test_stdin_file
- name: Check that the test_stdin backup file exists
assert:
that:
- test_stdin_file.stat.exists
- name: Run the backup scripts
shell: "./{{ item }}"
args:
chdir: /opt/restic/
with_items:
- backup-dicttest.sh
- backup-test.sh
- backup-test_stdin.sh

View file

@ -1,9 +0,0 @@
---
- name: Stat test restic link
stat:
path: ~/restic/restic
register: restic_link
- name: Check that the test restic link exists
assert:
that:
- restic_link.stat.exists

View file

@ -1,8 +0,0 @@
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
tasks:
- name: "Include test_alpha-services"
include_role:
name: "test_restic"