Changeset 37217 for gs3-installations
- Timestamp:
- 2023-01-30T14:39:57+13:00 (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--paged-image/_TEST-STEP02--GET-AND-SET-ASSOCFILES.sh
r37216 r37217 26 26 27 27 28 # The following posts to Greenstone3 using CURL, however GS3 action requires user authentication to run29 # As written the following when fail, due to it no supplying user-authentication details30 # A HACK to do here is edit:31 # gs2build/perllib/cgiactions/metadataaction.pm32 # and comment out the GS3_AUTHENTICATED test, changing the Perl code so it always33 # loads in modmetadataaction.pm (the module that has all the set-.* actions)34 35 28 36 29 cd "$store_cwd" 37 export GS3_AUTHENTICATED=true38 30 39 31 echo "========" … … 50 42 -F "assocname=09_1_1_1.gif" \ 51 43 -F "fileupload=@testing-files/10_1_1_1_CHANGED.gif" \ 52 $gs_context_url/cgi-bin/metadata-server.pl 44 $gs_context_url/cgi-bin/metadata-server.pl > curl-output.txt 45 46 fgrep ERROR curl-output.txt >/dev/null 2>&1 47 curl_fgrep_error=$? 48 49 cat curl-output.txt 50 /bin/rm curl-output.txt 51 53 52 echo "" 54 53 echo "--------" 55 54 echo "" 56 55 56 if [ $curl_fgrep_error = 0 ] ; then 57 57 58 echo "+ Checking the following files are different:" 59 echo "+ import/09/images/09_1_1_1.gif archives/HASH01b0.dir/09_1_1_1.gif" 60 61 ls -li import/09/images/09_1_1_1.gif archives/HASH01b0.dir/09_1_1_1.gif 62 63 diff import/09/images/09_1_1_1.gif archives/HASH01b0.dir/09_1_1_1.gif 64 65 diff_status=$? 66 67 if [ $diff_status != 0 ] ; then 68 echo "+" 69 echo "+ Diff-test Successful!" 70 echo "+" 58 echo "" >&2 59 echo "Error: failed to run 'curl' command" >&2 60 61 echo "" 62 echo "The above 'curl' command posts a form to 'metadata-server.pl' as a URL, " 63 echo "rather than setting QUERY_STRING and faking a run at the commandline." 64 echo "This means it the Tomcat server operated version of metadta-server.pl that" 65 echo "runs, and so the usual trick of setting GS3_AUTHENTICATED inside this script" 66 echo "doesn't work, and the curl command will fail saying there is no action" 67 echo "called 'set-archives-assocfile'" 68 echo "" 69 echo "A workaround is possible, by adjusting how tomcat is being run:" 70 echo " ant stop" 71 echo " export GS3_AUTHENTICATED=true" 72 echo " ant reset-logs" 73 echo " ant start" 74 echo "" 75 echo "This effectively pulls off the same within-script trick, only getting" 76 echo "it into the environment so Tomcat sees it, and passess it on when it" 77 echo "runs metadata-server.pl" 78 else 79 80 echo "+ Checking the following files are different:" 81 echo "+ import/09/images/09_1_1_1.gif archives/HASH01b0.dir/09_1_1_1.gif" 82 83 ls -li import/09/images/09_1_1_1.gif archives/HASH01b0.dir/09_1_1_1.gif 84 85 diff import/09/images/09_1_1_1.gif archives/HASH01b0.dir/09_1_1_1.gif 86 87 diff_status=$? 88 89 if [ $diff_status != 0 ] ; then 90 echo "+" 91 echo "+ Diff-test Successful!" 92 echo "+" 93 fi 71 94 fi 72 73 95 74 96 echo ""
Note:
See TracChangeset
for help on using the changeset viewer.