diff options
author | Johan Wassberg <jocar@sunet.se> | 2024-09-19 08:33:11 +0200 |
---|---|---|
committer | Johan Wassberg <jocar@sunet.se> | 2024-09-19 08:33:11 +0200 |
commit | dce90bf209726b7bb83cea94d63c27cf9c44f901 (patch) | |
tree | 6ea9d044aa101547e507d9312a1b8987bdbf3d5c | |
parent | 48b247839e7143c93e79a1938cb057f4062f9f25 (diff) |
More cleaning of SWAMID testning
-rw-r--r-- | metadata/Makefile.validate | 6 | ||||
-rwxr-xr-x | metadata/scripts/get-metadata.sh | 2 | ||||
-rwxr-xr-x | metadata/scripts/remove_entity.sh | 2 | ||||
-rwxr-xr-x | metadata/scripts/update-and-validate.sh | 2 |
4 files changed, 4 insertions, 8 deletions
diff --git a/metadata/Makefile.validate b/metadata/Makefile.validate index cc4848bc..7e36f226 100644 --- a/metadata/Makefile.validate +++ b/metadata/Makefile.validate @@ -1,16 +1,12 @@ EDUGAIN=$(patsubst swamid-edugain/%.xml,.time/%.validate,$(wildcard swamid-edugain/*.xml)) SWAMDI20=$(patsubst swamid-2.0/%.xml,.time/%.validate,$(wildcard swamid-2.0/*.xml)) -TESTING=$(patsubst swamid-testing/%.xml,.time/%.validate,$(wildcard swamid-testing/*.xml)) all: validate -validate: $(EDUGAIN) $(SWAMDI20) $(TESTING) +validate: $(EDUGAIN) $(SWAMDI20) .time/%.validate: swamid-edugain/%.xml @docker exec swamid-metadata-sp /var/www/scripts/importXML.bash /opt/metadata/$< Prod | grep -v "Import -> Added to db" > $@ .time/%.validate: swamid-2.0/%.xml @docker exec swamid-metadata-sp /var/www/scripts/importXML.bash /opt/metadata/$< Prod | grep -v "Import -> Added to db" > $@ - -.time/%.validate: swamid-testing/%.xml - @docker exec swamid-metadata-sp /var/www/scripts/importXML.bash /opt/metadata/$< Prod | grep -v "Import -> Added to db" > $@ diff --git a/metadata/scripts/get-metadata.sh b/metadata/scripts/get-metadata.sh index 78d9d717..1897628f 100755 --- a/metadata/scripts/get-metadata.sh +++ b/metadata/scripts/get-metadata.sh @@ -75,7 +75,7 @@ entityid=$(echo "$metadata" | sed -n 's/.*entityID=['\''"]\([^"]*\)['\''"].*/\1/ entityidfn=$(echo "$entityid" | sed 's;.*://;;' | sed 's/[^a-zwA-ZW0-9_.-]/-/g' | sed 's/$/.xml/') [ -n "$entityidfn" ] || error "Failed to generate filename from entityid $entityid" -OLDFILE=$(find ../swamid-testing ../swamid-2.0 ../swamid-edugain -name "$entityidfn" | grep -v "$xmldir") +OLDFILE=$(find ../swamid-2.0 ../swamid-edugain -name "$entityidfn" | grep -v "$xmldir") if [ -n "$OLDFILE" ]; then echo "Moving $OLDFILE into $xmldir" git mv "$OLDFILE" "$entityidfn" diff --git a/metadata/scripts/remove_entity.sh b/metadata/scripts/remove_entity.sh index 4906bf88..34eef69e 100755 --- a/metadata/scripts/remove_entity.sh +++ b/metadata/scripts/remove_entity.sh @@ -36,7 +36,7 @@ else entityidfn=$(echo "$entityid" | sed 's;.*://;;' | sed 's/[^a-zwA-ZW0-9_.-]/-/g' | sed 's/$/.xml/') [ -n "$entityidfn" ] || error "Failed to generate filename from entityid $entityid" fi -file=$(find swamid-testing swamid-2.0 swamid-edugain -name "$entityidfn" | head -1) +file=$(find swamid-2.0 swamid-edugain -name "$entityidfn" | head -1) if [ -r "$file" ]; then echo "---------------------" diff --git a/metadata/scripts/update-and-validate.sh b/metadata/scripts/update-and-validate.sh index 4cd286b2..9fba8268 100755 --- a/metadata/scripts/update-and-validate.sh +++ b/metadata/scripts/update-and-validate.sh @@ -6,7 +6,7 @@ update() mkdir -p .time # Remove old entitys from DB - ls swamid-edugain/*.xml swamid-2.0/*.xml swamid-testing/*.xml | sed 's@swamid-.*/\(.*\).xml@.time/\1.validate@' | sort > /tmp/$$.xml + ls swamid-edugain/*.xml swamid-2.0/*.xml | sed 's@swamid-.*/\(.*\).xml@.time/\1.validate@' | sort > /tmp/$$.xml ls .time/*.validate > /tmp/$$.time comm -13 /tmp/$$.xml /tmp/$$.time | while read file; do docker exec swamid-metadata-sp /var/www/scripts/removeEntity.bash /opt/metadata/$file |