Add CI test. Resolves: rhbz#2009152

This commit is contained in:
Akira TAGOH 2021-09-30 14:29:59 +09:00 committed by Stepan Oksanichenko
parent b2fe70f1d0
commit 45a6bba18e
4 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1 @@
c30a00468467ce71752aab302ab826a3aca10c42 ruamel-yaml-0.16.6.tar.gz

View File

@ -5,7 +5,7 @@
Name: python-%{pname}
Version: 0.16.6
Release: 7%{?dist}
Release: 7%{?dist}.1
Summary: YAML 1.2 loader/dumper package for Python
License: MIT
@ -66,6 +66,10 @@ PYTHONPATH=$(echo build/lib) py.test-%{python3_version} _test/test_*.py
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%changelog
* Thu Sep 30 2021 Akira TAGOH <tagoh@redhat.com> - 0.16.6-7.1
- Add CI test.
Resolves: rhbz#2009152
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.16.6-7
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688

14
tests/basic/test.py Normal file
View File

@ -0,0 +1,14 @@
#! /usr/bin/python3
import sys
import os
from ruamel.yaml import YAML
f = open(os.path.abspath(os.path.join(os.path.dirname(__file__),'..', 'tests.yml')), 'r')
s = f.read()
f.close()
yaml = YAML()
data = yaml.load(s)
if data[0]['hosts'] != 'localhost':
exit(1)

12
tests/tests.yml Normal file
View File

@ -0,0 +1,12 @@
- hosts: localhost
become: yes
tags:
- classic
roles:
- role: standard-test-basic
required_packages:
- python3-ruamel-yaml
- python3
tests:
- basic:
run: python3 ./test.py