parent
f5673662e9
commit
eac1256b57
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
@ -10,7 +10,7 @@
|
||||
Name: keepalived
|
||||
Summary: High Availability monitor built upon LVS, VRRP and service pollers
|
||||
Version: 2.2.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://www.keepalived.org/
|
||||
|
||||
@ -105,6 +105,9 @@ mkdir -p %{buildroot}%{_libexecdir}/keepalived
|
||||
%{_mandir}/man8/keepalived.8*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 16 2021 Ryan O'Hara <rohara@redhat.com> - 2.2.3-2
|
||||
- Add gating tests (#1968596)
|
||||
|
||||
* Mon Aug 16 2021 Ryan O'Hara <rohara@redhat.com> - 2.2.3-1
|
||||
- Update to 2.2.3 (#1968596)
|
||||
|
||||
|
17
tests/keepalived.conf.in
Normal file
17
tests/keepalived.conf.in
Normal file
@ -0,0 +1,17 @@
|
||||
global_defs {
|
||||
router_id TEST
|
||||
}
|
||||
|
||||
vrrp_instance VRRP {
|
||||
state MASTER
|
||||
priority 100
|
||||
advert_int 1
|
||||
interface eth0
|
||||
virtual_router_id 100
|
||||
virtual_ipaddress {
|
||||
$VIP_INCLUDE
|
||||
}
|
||||
virtual_ipaddress_excluded {
|
||||
$VIP_EXCLUDE
|
||||
}
|
||||
}
|
91
tests/run_tests.sh
Executable file
91
tests/run_tests.sh
Executable file
@ -0,0 +1,91 @@
|
||||
#!/bin/sh
|
||||
|
||||
export VIP_INCLUDE="192.168.1.101"
|
||||
export VIP_EXCLUDE="192.168.1.102"
|
||||
|
||||
echo -ne "[debug]: setting up config file ... "
|
||||
envsubst '${VIP_INCLUDE},${VIP_EXCLUDE}' < ./keepalived.conf.in > /etc/keepalived/keepalived.conf
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
echo -ne "[debug]: starting service ... "
|
||||
systemctl start keepalived
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
echo -ne "[debug]: checking service active ... "
|
||||
systemctl -q is-active keepalived
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
echo -ne "[debug]: checking included VIP ... "
|
||||
ip addr show eth0 | grep -q ${VIP_INCLUDE}
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
echo -ne "[debug]: checking excluded VIP ... "
|
||||
ip addr show eth0 | grep -q ${VIP_EXCLUDE}
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
echo -ne "[debug]: stopping service ... "
|
||||
systemctl stop keepalived
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
echo -ne "[debug]: checking service inactive ... "
|
||||
systemctl -q is-active keepalived
|
||||
if [ $? -ne 3 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
|
||||
echo -ne "[debug]: checking include VIP ... "
|
||||
ip addr show eth0 | grep -q ${VIP_INCLUDE}
|
||||
if [ $? -ne 1 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
echo -ne "[debug]: checking exclude VIP ... "
|
||||
ip addr show eth0 | grep -q ${VIP_EXCLUDE}
|
||||
if [ $? -ne 1 ] ; then
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
exit 0
|
11
tests/tests.yml
Normal file
11
tests/tests.yml
Normal file
@ -0,0 +1,11 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- simple:
|
||||
dir: .
|
||||
run: ./run_tests.sh
|
||||
required_packages:
|
||||
- gettext
|
Loading…
Reference in New Issue
Block a user