Skip to content

Commit

Permalink
GNU and BSD sed interoperability for catzones.tdir
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed Dec 5, 2024
1 parent 32734a8 commit 8a95b98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tpkg/catzones.tdir/catzones.test
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ for TEST in 1.1 1.2 1.3 1.4 2.1 2.2 3 4; do
done

cp primary.conf primary.conf.bak
sed -i 's/-zone: "catalog2.invalid"/-zone: "catalog3.invalid"/' primary.conf
sed -i.orig1 's/-zone: "catalog2.invalid"/-zone: "catalog3.invalid"/' primary.conf
if $PRIMARY_CONTROL reconfig | tail -1 | grep '^ok$'; then
echo "Should not be able to change catalog producer member zones"
exit 1
fi

cp primary.conf.bak primary.conf
sed -i 's/catalog-producer-zone: "catalog2.invalid"//' primary.conf
sed -i.orig2 's/catalog-producer-zone: "catalog2.invalid"//' primary.conf
if $PRIMARY_CONTROL reconfig | tail -1 | grep '^ok$'; then
echo "Should not be able to remove catalog producer member zones"
exit 1
Expand All @@ -179,7 +179,7 @@ if ! $PRIMARY_CONTROL reconfig | tail -1 | grep '^ok$'; then
fi

cp primary.conf primary.conf.bak
sed -i 's/#catalog-producer-zone:/catalog-producer-zone:/' primary.conf
sed -i.orig3 's/#catalog-producer-zone:/catalog-producer-zone:/' primary.conf
if $PRIMARY_CONTROL reconfig | tail -1 | grep '^ok$'; then
echo "An existing pattern may not become cat producer member zone pat"
exit 1
Expand Down

0 comments on commit 8a95b98

Please sign in to comment.