#!/usr/bin/env bash

for NIGHTLY_VERSION in $NIGHTLY_MASTER_VERSION $NIGHTLY_STABLE_VERSION $NIGHTLY_MAINT_VERSION; do
  export VERSION=$NIGHTLY_VERSION
  timeout 10m docker-compose -f docker-compose.test.yml run --rm sut || ( echo "test for docker image geoserver:$VERSION failed" && echo $VERSION >> /tmp/failed_versions )
done

for VERSION in $STABLE_VERSION $MAINT_VERSION; do 
  #export VERSION=$VERSION
  timeout 10m docker-compose -f docker-compose.test.yml run --rm sut || ( echo "test for docker image geoserver:$VERSION failed" && echo $VERSION >> /tmp/failed_versions )
done

for VERSION in $RC_VERSION; do
  timeout 10m docker-compose -f docker-compose.test.yml run --rm sut || ( echo "test for docker image geoserver:$VERSION failed" && echo $VERSION >> /tmp/failed_versions )
done
