Add CI test.
Resolves: rhbz#2009152
This commit is contained in:
parent
b2fe70f1d0
commit
b4ed6663a5
@ -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
14
tests/basic/test.py
Normal 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
12
tests/tests.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user