diff --git a/livesupport/modules/storage/src/WebStorageClient.cxx b/livesupport/modules/storage/src/WebStorageClient.cxx index 5d75e39e2..6eec54064 100644 --- a/livesupport/modules/storage/src/WebStorageClient.cxx +++ b/livesupport/modules/storage/src/WebStorageClient.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.32 $ + Version : $Revision: 1.33 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -708,7 +708,7 @@ WebStorageClient :: createPlaylist(Ptr::Ref sessionId) << createPlaylistMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(createPlaylistResultParamName) @@ -780,7 +780,7 @@ WebStorageClient :: existsPlaylist(Ptr::Ref sessionId, << existsPlaylistMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(existsPlaylistResultParamName) @@ -842,7 +842,7 @@ WebStorageClient :: getPlaylist(Ptr::Ref sessionId, << getPlaylistOpenMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(getPlaylistUrlParamName) @@ -901,7 +901,7 @@ WebStorageClient :: getPlaylist(Ptr::Ref sessionId, << getPlaylistCloseMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(getPlaylistPlaylistIdParamName) @@ -998,7 +998,7 @@ WebStorageClient :: editPlaylistGetUrl(Ptr::Ref sessionId, << editPlaylistMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(editPlaylistUrlParamName) @@ -1073,7 +1073,7 @@ WebStorageClient :: savePlaylist(Ptr::Ref sessionId, << savePlaylistMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(savePlaylistResultParamName) @@ -1271,7 +1271,7 @@ WebStorageClient :: deletePlaylist(Ptr::Ref sessionId, << deletePlaylistMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(deletePlaylistResultParamName) @@ -1345,7 +1345,7 @@ WebStorageClient :: existsAudioClip(Ptr::Ref sessionId, << existsAudioClipMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(existsAudioClipResultParamName) @@ -1399,7 +1399,7 @@ WebStorageClient :: getAudioClip(Ptr::Ref sessionId, << getAudioClipOpenMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(getAudioClipUrlParamName) @@ -1460,7 +1460,7 @@ WebStorageClient :: getAudioClip(Ptr::Ref sessionId, << getAudioClipCloseMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(getAudioClipAudioClipIdParamName) @@ -1540,7 +1540,7 @@ WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, << storeAudioClipOpenMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(storeAudioClipUrlParamName) @@ -1618,7 +1618,7 @@ WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, << storeAudioClipCloseMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(storeAudioClipAudioClipIdParamName) @@ -1683,7 +1683,7 @@ WebStorageClient :: acquireAudioClip(Ptr::Ref sessionId, << acquireAudioClipMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(acquireAudioClipUrlParamName) @@ -1749,7 +1749,7 @@ WebStorageClient :: releaseAudioClip(Ptr::Ref sessionId, << releaseAudioClipMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(releaseAudioClipResultParamName) @@ -1814,7 +1814,7 @@ WebStorageClient :: deleteAudioClip(Ptr::Ref sessionId, << deleteAudioClipMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(deleteAudioClipResultParamName) @@ -1885,7 +1885,7 @@ WebStorageClient :: reset(void) << resetStorageMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(resetStorageAudioClipResultParamName) @@ -1975,7 +1975,7 @@ WebStorageClient :: search(Ptr::Ref sessionId, << searchMethodName << "' returned error message:\n" << result; - throw XmlRpcMethodFaultException(eMsg.str()); + throw Core::XmlRpcMethodFaultException(eMsg.str()); } if (! result.hasMember(searchAudioClipResultParamName) diff --git a/livesupport/modules/storage/src/WebStorageClientTest.cxx b/livesupport/modules/storage/src/WebStorageClientTest.cxx index d2e21d9d9..49c980fc3 100644 --- a/livesupport/modules/storage/src/WebStorageClientTest.cxx +++ b/livesupport/modules/storage/src/WebStorageClientTest.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.33 $ + Version : $Revision: 1.34 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClientTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -187,7 +187,7 @@ WebStorageClientTest :: playlistTest(void) CPPUNIT_FAIL(e.what()); } CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() >= 3); - Ptr::Ref audioClipId = wsc->getAudioClipIds()->at(0); + Ptr::Ref audioClipId = wsc->getAudioClipIds()->at(2); Ptr::Ref sessionId; try { @@ -504,7 +504,7 @@ WebStorageClientTest :: simplePlaylistTest(void) } catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } - CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() >= 3); + CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() >= 1); Ptr::Ref audioClipId = wsc->getAudioClipIds()->at(0); Ptr::Ref sessionId; @@ -596,10 +596,12 @@ WebStorageClientTest :: searchTest(void) } catch (XmlRpcException &e) { CPPUNIT_FAIL(e.what()); } - CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() >= 3); + CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() >= 5); Ptr::Ref audioClip0 = wsc->getAudioClipIds()->at(0); Ptr::Ref audioClip1 = wsc->getAudioClipIds()->at(1); Ptr::Ref audioClip2 = wsc->getAudioClipIds()->at(2); + Ptr::Ref audioClip3 = wsc->getAudioClipIds()->at(3); + Ptr::Ref audioClip4 = wsc->getAudioClipIds()->at(4); CPPUNIT_ASSERT(wsc->getPlaylistIds()->size() >= 1); Ptr::Ref playlist0 = wsc->getPlaylistIds()->at(0); @@ -618,8 +620,8 @@ WebStorageClientTest :: searchTest(void) int numberFound = wsc->search(sessionId, criteria); CPPUNIT_ASSERT(numberFound == 2); CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() == 2); - CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip0); - CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(1) == *audioClip2); + CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip2); + CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(1) == *audioClip4); } catch (std::invalid_argument &e) { CPPUNIT_FAIL(e.what()); @@ -652,7 +654,7 @@ WebStorageClientTest :: searchTest(void) int numberFound = wsc->search(sessionId, criteria); CPPUNIT_ASSERT(numberFound == 1); CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() == 1); - CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip1); + CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip3); CPPUNIT_ASSERT(wsc->getPlaylistIds()->size() == 0); } catch (std::invalid_argument &e) { @@ -663,12 +665,13 @@ WebStorageClientTest :: searchTest(void) try { Ptr::Ref criteria(new SearchCriteria("all", "or")); - criteria->addCondition("dcterms:extent", ">", "00:00:11.000000"); - criteria->addCondition("dc:title", "prefix", "File2"); + criteria->addCondition("dcterms:extent", "<", "00:00:03.000000"); + criteria->addCondition("dc:title", "prefix", "My"); int numberFound = wsc->search(sessionId, criteria); - CPPUNIT_ASSERT(numberFound == 2); - CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() == 1); - CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip1); + CPPUNIT_ASSERT(numberFound == 3); + CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() == 2); + CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip3); + CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(1) == *audioClip4); CPPUNIT_ASSERT(wsc->getPlaylistIds()->size() == 1); CPPUNIT_ASSERT(*wsc->getPlaylistIds()->at(0) == *playlist0); @@ -683,12 +686,12 @@ WebStorageClientTest :: searchTest(void) criteria->setType("all"); criteria->addCondition("dc:title", "partial", "t"); criteria->setLimit(2); - criteria->setOffset(1); + criteria->setOffset(2); int numberFound = wsc->search(sessionId, criteria); - CPPUNIT_ASSERT(numberFound == 4); + CPPUNIT_ASSERT(numberFound == 5); CPPUNIT_ASSERT(wsc->getAudioClipIds()->size() == 2); - CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip1); - CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(1) == *audioClip2); + CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(0) == *audioClip3); + CPPUNIT_ASSERT(*wsc->getAudioClipIds()->at(1) == *audioClip4); CPPUNIT_ASSERT(wsc->getPlaylistIds()->size() == 0); } catch (std::invalid_argument &e) { diff --git a/livesupport/modules/storageServer/var/tests/plist1.xml b/livesupport/modules/storageServer/var/tests/plist1.xml index 05f7aac39..9bed392bd 100644 --- a/livesupport/modules/storageServer/var/tests/plist1.xml +++ b/livesupport/modules/storageServer/var/tests/plist1.xml @@ -1,13 +1,11 @@ - - + - - + + My First Playlist Me, myself and I - 00:00:23.000000 + 01:30:00.000000 diff --git a/livesupport/modules/storageServer/var/tests/sampleData.php b/livesupport/modules/storageServer/var/tests/sampleData.php index 007d6372f..e6cdb1e25 100644 --- a/livesupport/modules/storageServer/var/tests/sampleData.php +++ b/livesupport/modules/storageServer/var/tests/sampleData.php @@ -1,5 +1,17 @@ 'audioclip', + 'media' => '../tests/test10001.mp3', + 'xml' => '../tests/mdata10001.xml', + 'gunid' => '0000000000010001' + ), + array( + 'type' => 'audioclip', + 'media' => '../tests/test10002.mp3', + 'xml' => '../tests/mdata10002.xml', + 'gunid' => '0000000000010002' + ), array( 'type' => 'audioclip', 'media' => '../tests/ex1.mp3', @@ -20,7 +32,7 @@ array( 'type' => 'playlist', 'xml' => '../tests/plist1.xml', - 'gunid' => '123456789abcdef3' + 'gunid' => '0000000000000001' ) ); ?> diff --git a/livesupport/modules/storageServer/var/tests/test10001.mp3 b/livesupport/modules/storageServer/var/tests/test10001.mp3 new file mode 100644 index 000000000..a469931db Binary files /dev/null and b/livesupport/modules/storageServer/var/tests/test10001.mp3 differ diff --git a/livesupport/modules/storageServer/var/tests/test10002.mp3 b/livesupport/modules/storageServer/var/tests/test10002.mp3 new file mode 100644 index 000000000..1219a9056 Binary files /dev/null and b/livesupport/modules/storageServer/var/tests/test10002.mp3 differ diff --git a/livesupport/products/scheduler/etc/Makefile.in b/livesupport/products/scheduler/etc/Makefile.in index f51efb57a..00a755949 100644 --- a/livesupport/products/scheduler/etc/Makefile.in +++ b/livesupport/products/scheduler/etc/Makefile.in @@ -21,7 +21,7 @@ # # # Author : $Author: fgerlits $ -# Version : $Revision: 1.45 $ +# Version : $Revision: 1.46 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/Makefile.in,v $ # # @configure_input@ @@ -242,6 +242,7 @@ TEST_RUNNER_LIBS = ${SCHEDULER_EXE_LIBS} -lcppunit -ldl .PHONY: all dir_setup doc clean docclean depclean distclean .PHONY: install start status run_tests stop uninstall .PHONY: install_web start_web status_web run_web stop_web uninstall_web +.PHONY: check check_web all: dir_setup ${SCHEDULER_EXE} @@ -271,7 +272,9 @@ depclean: clean distclean: clean docclean ${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te* -check: all ${TEST_RUNNER} storage_server_init start run_tests stop +check: all ${TEST_RUNNER} start run_tests stop + +check_web: all ${TEST_RUNNER} storage_server_init start_web run_tests stop_web run_tests: ${TEST_RUNNER} ${TEST_RUNNER} -o ${TEST_RESULTS} -s ${TEST_XSLT} @@ -319,7 +322,7 @@ uninstall_web: ${SCHEDULER_EXE} ${SCHEDULER_EXE} -c ${SCHEDULER_WEB_CFG} uninstall storage_server_init: -# ${MAKE} -C ${STORAGE_SERVER_DIR} + ${MAKE} -C ${STORAGE_SERVER_DIR} kill: ${KILLALL} scheduler diff --git a/livesupport/products/scheduler/etc/testAuthenticationClient.xml b/livesupport/products/scheduler/etc/testAuthenticationClient.xml new file mode 100644 index 000000000..7a1580f07 --- /dev/null +++ b/livesupport/products/scheduler/etc/testAuthenticationClient.xml @@ -0,0 +1,18 @@ + + + + + + + + + +]> + + + + + diff --git a/livesupport/products/scheduler/etc/webAuthenticationClient.xml b/livesupport/products/scheduler/etc/webAuthenticationClient.xml new file mode 100644 index 000000000..f13840213 --- /dev/null +++ b/livesupport/products/scheduler/etc/webAuthenticationClient.xml @@ -0,0 +1,19 @@ + + + + + + + + + +]> + + + + + diff --git a/livesupport/products/scheduler/etc/webStorageClient.xml b/livesupport/products/scheduler/etc/webStorageClient.xml index 5471c5f25..557ce5a2a 100644 --- a/livesupport/products/scheduler/etc/webStorageClient.xml +++ b/livesupport/products/scheduler/etc/webStorageClient.xml @@ -1,16 +1,20 @@ - - + - + ]> - - - + + + + + diff --git a/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx b/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx index 31299e18b..691f7b1bc 100644 --- a/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx +++ b/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.14 $ + Version : $Revision: 1.15 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/UploadPlaylistMethod.cxx,v $ ------------------------------------------------------------------------------*/ @@ -143,7 +143,7 @@ UploadPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, Ptr::Ref playlist; try { playlist = storage->getPlaylist(sessionId, playlistId); - } catch (XmlRpcException &e) { + } catch (Core::XmlRpcException &e) { std::string eMsg = "playlist not found:\n"; eMsg += e.what(); XmlRpcTools::markError(errorId+4, eMsg, returnValue);