Blame tests/06-map_domain.tests

Packit 51d0f7
#!/bin/bash
Packit 51d0f7
Packit 51d0f7
#
Packit 51d0f7
# NetLabel Tools test script
Packit 51d0f7
#
Packit 51d0f7
Packit 51d0f7
#
Packit 51d0f7
# This program is free software: you can redistribute it and/or modify
Packit 51d0f7
# it under the terms of version 2 of the GNU General Public License as
Packit 51d0f7
# published by the Free Software Foundation.
Packit 51d0f7
#
Packit 51d0f7
# This program is distributed in the hope that it will be useful,
Packit 51d0f7
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 51d0f7
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 51d0f7
# GNU General Public License for more details.
Packit 51d0f7
#
Packit 51d0f7
# You should have received a copy of the GNU General Public License
Packit 51d0f7
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 51d0f7
#
Packit 51d0f7
Packit 51d0f7
# add the domain mapping
Packit 51d0f7
$GLBL_NETLABELCTL map add domain:test protocol:unlbl
Packit 51d0f7
[[ $? -ne 0 ]] && exit 1
Packit 51d0f7
Packit 51d0f7
# verify the domain mapping
Packit 51d0f7
found=0
Packit 51d0f7
for i in $($GLBL_NETLABELCTL map list); do
Packit 51d0f7
	[[ $i == "domain:\"test\",UNLABELED" ]] && found=1
Packit 51d0f7
done
Packit 51d0f7
[[ $found -eq 0 ]] && exit 1
Packit 51d0f7
Packit 51d0f7
# remove the domain mapping
Packit 51d0f7
$GLBL_NETLABELCTL map del domain:test
Packit 51d0f7
[[ $? -ne 0 ]] && exit 1
Packit 51d0f7
Packit 51d0f7
exit 0