Skip to content

Commit

Permalink
#2084 fix import_all.sh from e2e scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-Olosutean authored Jun 21, 2022
1 parent f6eba99 commit efb2990
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions examples/data/e2e_tests/setup_scripts/import_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ MAPPING_TABLE_DIR="${DATA_DIR}/mapping_tables"
USER=""
PASSWORD=""
URL=""
COOKIE_FILE=$(mktemp /tmp/cookie-jar.txt.XXXXXX)
HEADERS_FILE=$(mktemp /tmp/headers.txt.XXXXXX)

if [ "$1" != "with" ]; then
Expand All @@ -35,7 +34,7 @@ else
if [ "$2" = "defaults" ]; then
USER="user"
PASSWORD="changeme"
URL="http://localhost:8080/menas"
URL="http://localhost:8080/rest_api"
else
USER=$2
PASSWORD=$3
Expand All @@ -47,7 +46,6 @@ import_function () {
for var in `ls -d ${PWD}/${1}/*`; do
canonicalPath=$(realpath "${var}")
curl -v \
-b $COOKIE_FILE \
-H "@${HEADERS_FILE}" \
-H 'Content-Type:application/json' \
--data "@${canonicalPath}" \
Expand All @@ -57,13 +55,11 @@ import_function () {

curl -v \
-X POST \
-c $COOKIE_FILE \
-D $HEADERS_FILE \
"$URL/api/login?username=$USER&password=$PASSWORD"

import_function $SCHEMA_DIR "schema"
import_function $MAPPING_TABLE_DIR "mappingTable"
import_function $DATASET_DIR "dataset"

rm $COOKIE_FILE
rm $HEADERS_FILE

0 comments on commit efb2990

Please sign in to comment.