#!/bin/bash
product_list_file=$1

docker exec -i $(docker ps -qf "name=emg-pvs_registrar") python3 /var/www/pvs/dev/pvs_instance/manage.py storage create pvs_testing pvs_testing --type swift --storage-auth auth-cloud-ovh

IFS=","
while read  product; do  

    docker exec -i $(docker ps -qf "name=emg-pvs_registrar") python3 /core/registrar.py --objects-prefix $product <<<$product
    
done < $product_list_file

pytest -s registrar_test.py --name $product_list_file
