1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-02-01 19:59:12 +00:00

Fix updater nightly version check

This commit is contained in:
Ozzie Isaacs 2024-11-05 18:35:15 +01:00
parent 4c3fc90830
commit f0b770224a
2 changed files with 91 additions and 232 deletions

View File

@ -614,7 +614,7 @@ class Updater(threading.Thread):
if version is False:
status['current_commit_hash'] = _(u'Unknown')
else:
status['current_commit_hash'] = version
status['current_commit_hash'] = version['version']
try:
headers = {'Accept': 'application/vnd.github.v3+json'}
r = requests.get(repository_url, headers=headers, timeout=10)

View File

@ -37,20 +37,20 @@
<div class="row">
<div class="col-xs-6 col-md-6 col-sm-offset-3" style="margin-top:50px;">
<p class='text-justify attribute'><strong>Start Time: </strong>2024-11-02 08:09:02</p>
<p class='text-justify attribute'><strong>Start Time: </strong>2024-11-02 20:22:07</p>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-md-6 col-sm-offset-3">
<p class='text-justify attribute'><strong>Stop Time: </strong>2024-11-02 15:03:00</p>
<p class='text-justify attribute'><strong>Stop Time: </strong>2024-11-03 03:38:36</p>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-md-6 col-sm-offset-3">
<p class='text-justify attribute'><strong>Duration: </strong>5h 47 min</p>
<p class='text-justify attribute'><strong>Duration: </strong>6h 9 min</p>
</div>
</div>
</div>
@ -2065,13 +2065,13 @@
<tr id="su" class="errorClass">
<tr id="su" class="failClass">
<td>TestLoadMetadata</td>
<td class="text-center">1</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">1</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">
<a onclick="showClassDetail('c18', 1)">Detail</a>
</td>
@ -2079,26 +2079,28 @@
<tr id="et18.1" class="none bg-info">
<tr id="ft18.1" class="none bg-danger">
<td>
<div class='testcase'>TestLoadMetadata - test_load_metadata</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_et18.1')">ERROR</a>
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_ft18.1')">FAIL</a>
</div>
<!--css div popup start-->
<div id="div_et18.1" class="popup_window test_output" style="display:block;">
<div id="div_ft18.1" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_et18.1').style.display='none'"><span
onclick="document.getElementById('div_ft18.1').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_edit_books_metadata.py&#34;, line 99, in test_load_metadata
if results[cont][&#39;source&#39;] == &#39;https://comicvine.gamespot.com/&#39;:
IndexError: list index out of range</pre>
File &#34;/home/ozzie/Development/calibre-web-test/test/test_edit_books_metadata.py&#34;, line 111, in test_load_metadata
self.assertEqual(&#39;https://comicvine.gamespot.com/&#39;, results[cv][&#39;source&#39;])
AssertionError: &#39;https://comicvine.gamespot.com/&#39; != &#39;https://amazon.com/&#39;
- https://comicvine.gamespot.com/
+ https://amazon.com/</pre>
</div>
<div class="clearfix"></div>
</div>
@ -2732,11 +2734,11 @@ IndexError: list index out of range</pre>
<tr id="su" class="failClass">
<tr id="su" class="passClass">
<td>TestKoboSync</td>
<td class="text-center">12</td>
<td class="text-center">11</td>
<td class="text-center">1</td>
<td class="text-center">12</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">
@ -2827,31 +2829,11 @@ IndexError: list index out of range</pre>
<tr id="ft30.10" class="none bg-danger">
<tr id='pt30.10' class='hiddenRow bg-success'>
<td>
<div class='testcase'>TestKoboSync - test_sync_shelf</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_ft30.10')">FAIL</a>
</div>
<!--css div popup start-->
<div id="div_ft30.10" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_ft30.10').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_kobo_sync.py&#34;, line 372, in test_sync_shelf
self.assertEqual(1, len(data), data)
AssertionError: 1 != 0 : []</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
<td colspan='6' align='center'>PASS</td>
</tr>
@ -3408,12 +3390,12 @@ AssertionError: 1 != 0 : []</pre>
<tr id="su" class="passClass">
<tr id="su" class="errorClass">
<td>TestLogin</td>
<td class="text-center">19</td>
<td class="text-center">19</td>
<td class="text-center">0</td>
<td class="text-center">18</td>
<td class="text-center">0</td>
<td class="text-center">1</td>
<td class="text-center">0</td>
<td class="text-center">
<a onclick="showClassDetail('c36', 19)">Detail</a>
@ -3548,11 +3530,46 @@ AssertionError: 1 != 0 : []</pre>
<tr id='pt36.15' class='hiddenRow bg-success'>
<tr id="et36.15" class="none bg-info">
<td>
<div class='testcase'>TestLogin - test_password_policy</div>
</td>
<td colspan='6' align='center'>PASS</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_et36.15')">ERROR</a>
</div>
<!--css div popup start-->
<div id="div_et36.15" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_et36.15').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_login.py&#34;, line 347, in test_password_policy
self.create_user(&#39;lower_user&#39;, {&#39;password&#39;: &#39;123456P+&#39;, &#39;email&#39;: &#39;a3@b.com&#39;})
File &#34;/home/ozzie/Development/calibre-web-test/test/helper_ui.py&#34;, line 1013, in create_user
return cls.change_user(config)
File &#34;/home/ozzie/Development/calibre-web-test/test/helper_ui.py&#34;, line 1083, in change_user
ele = cls.driver.find_element(By.ID, key)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py&#34;, line 830, in find_element
return self.execute(Command.FIND_ELEMENT, {&#34;using&#34;: by, &#34;value&#34;: value})[&#34;value&#34;]
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py&#34;, line 440, in execute
self.error_handler.check_response(response)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py&#34;, line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id=&#34;password&#34;]
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5
dom.find/&lt;/&lt;@chrome://remote/content/shared/DOM.sys.mjs:136:16</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
</tr>
@ -4655,12 +4672,12 @@ AssertionError: 1 != 0 : []</pre>
<tr id="su" class="errorClass">
<tr id="su" class="skipClass">
<td>TestUpdater</td>
<td class="text-center">9</td>
<td class="text-center">3</td>
<td class="text-center">1</td>
<td class="text-center">4</td>
<td class="text-center">8</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">1</td>
<td class="text-center">
<a onclick="showClassDetail('c52', 9)">Detail</a>
@ -4687,154 +4704,38 @@ AssertionError: 1 != 0 : []</pre>
<tr id="et52.3" class="none bg-info">
<tr id='pt52.3' class='hiddenRow bg-success'>
<td>
<div class='testcase'>TestUpdater - test_check_update_stable_errors</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_et52.3')">ERROR</a>
</div>
<!--css div popup start-->
<div id="div_et52.3" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_et52.3').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_updater.py&#34;, line 153, in test_check_update_stable_errors
self.check_updater(&#39;Timeout&#39;, &#34;alert&#34;, 13)
File &#34;/home/ozzie/Development/calibre-web-test/test/test_updater.py&#34;, line 87, in check_updater
self.assertTrue(responsetext in self.check_element_on_page((By.ID, &#34;message&#34;)).text)
AttributeError: &#39;bool&#39; object has no attribute &#39;text&#39;</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
<td colspan='6' align='center'>PASS</td>
</tr>
<tr id="et52.4" class="none bg-info">
<tr id='pt52.4' class='hiddenRow bg-success'>
<td>
<div class='testcase'>TestUpdater - test_check_update_stable_versions</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_et52.4')">ERROR</a>
</div>
<!--css div popup start-->
<div id="div_et52.4" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_et52.4').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_updater.py&#34;, line 181, in test_check_update_stable_versions
self.check_updater(&#39;{}.{}.{}&#39;.format(*version3), &#34;alert-warning&#34;)
File &#34;/home/ozzie/Development/calibre-web-test/test/test_updater.py&#34;, line 87, in check_updater
self.assertTrue(responsetext in self.check_element_on_page((By.ID, &#34;message&#34;)).text)
AttributeError: &#39;bool&#39; object has no attribute &#39;text&#39;</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
<td colspan='6' align='center'>PASS</td>
</tr>
<tr id="et52.5" class="none bg-info">
<tr id='pt52.5' class='hiddenRow bg-success'>
<td>
<div class='testcase'>TestUpdater - test_perform_update</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_et52.5')">ERROR</a>
</div>
<!--css div popup start-->
<div id="div_et52.5" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_et52.5').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_updater.py&#34;, line 390, in test_perform_update
performUpdate.click()
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py&#34;, line 93, in click
self._execute(Command.CLICK_ELEMENT)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py&#34;, line 403, in _execute
return self._parent.execute(command, params)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py&#34;, line 440, in execute
self.error_handler.check_response(response)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py&#34;, line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: Element &lt;div id=&#34;perform_update&#34; class=&#34;btn btn-primary hidden&#34;&gt; could not be scrolled into view
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:353:5
webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:167:11
interaction.clickElement@chrome://remote/content/marionette/interaction.sys.mjs:136:11
clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:205:29
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:85:31</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
<td colspan='6' align='center'>PASS</td>
</tr>
<tr id="et52.6" class="none bg-info">
<tr id='pt52.6' class='hiddenRow bg-success'>
<td>
<div class='testcase'>TestUpdater - test_perform_update_stable_errors</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_et52.6')">ERROR</a>
</div>
<!--css div popup start-->
<div id="div_et52.6" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_et52.6').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_updater.py&#34;, line 330, in test_perform_update_stable_errors
performUpdate.click()
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py&#34;, line 93, in click
self._execute(Command.CLICK_ELEMENT)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py&#34;, line 403, in _execute
return self._parent.execute(command, params)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py&#34;, line 440, in execute
self.error_handler.check_response(response)
File &#34;/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py&#34;, line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: Element &lt;div id=&#34;perform_update&#34; class=&#34;btn btn-primary hidden&#34;&gt; could not be scrolled into view
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:353:5
webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:167:11
interaction.clickElement@chrome://remote/content/marionette/interaction.sys.mjs:136:11
clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:205:29
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:85:31</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
<td colspan='6' align='center'>PASS</td>
</tr>
@ -4874,31 +4775,11 @@ receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild
<tr id="ft52.9" class="none bg-danger">
<tr id='pt52.9' class='hiddenRow bg-success'>
<td>
<div class='testcase'>TestUpdater - test_update_write_protect</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_ft52.9')">FAIL</a>
</div>
<!--css div popup start-->
<div id="div_ft52.9" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_ft52.9').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_updater.py&#34;, line 431, in test_update_write_protect
self.assertTrue(self.check_element_on_page((By.ID, &#34;message&#34;)))
AssertionError: False is not true</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
<td colspan='6' align='center'>PASS</td>
</tr>
@ -5027,11 +4908,11 @@ AssertionError: False is not true</pre>
<tr id="su" class="failClass">
<tr id="su" class="passClass">
<td>TestUploadEPubs</td>
<td class="text-center">6</td>
<td class="text-center">5</td>
<td class="text-center">1</td>
<td class="text-center">6</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">0</td>
<td class="text-center">
@ -5086,33 +4967,11 @@ AssertionError: False is not true</pre>
<tr id="ft54.6" class="none bg-danger">
<tr id='pt54.6' class='hiddenRow bg-success'>
<td>
<div class='testcase'>TestUploadEPubs - test_upload_epub_lang</div>
</td>
<td colspan='6'>
<div class="text-center">
<a class="popup_link text-center" onfocus='blur()' onclick="showTestDetail('div_ft54.6')">FAIL</a>
</div>
<!--css div popup start-->
<div id="div_ft54.6" class="popup_window test_output" style="display:block;">
<div class='close_button pull-right'>
<button type="button" class="close" aria-label="Close" onfocus="this.blur();"
onclick="document.getElementById('div_ft54.6').style.display='none'"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="text-left pull-left">
<pre class="text-left">Traceback (most recent call last):
File &#34;/home/ozzie/Development/calibre-web-test/test/test_upload_epubs.py&#34;, line 88, in test_upload_epub_lang
details = self.verify_upload(epub_file, check_warning=True)
File &#34;/home/ozzie/Development/calibre-web-test/test/test_upload_epubs.py&#34;, line 79, in verify_upload
self.assertTrue(self.check_element_on_page((By.ID, &#34;flash_warning&#34;)))
AssertionError: False is not true</pre>
</div>
<div class="clearfix"></div>
</div>
<!--css div popup end-->
</td>
<td colspan='6' align='center'>PASS</td>
</tr>
@ -6014,9 +5873,9 @@ AssertionError: False is not true</pre>
<tr id='total_row' class="text-center bg-grey">
<td>Total</td>
<td>525</td>
<td>508</td>
<td>3</td>
<td>5</td>
<td>514</td>
<td>1</td>
<td>1</td>
<td>9</td>
<td>&nbsp;</td>
</tr>
@ -6237,7 +6096,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestBackupMetadataGdrive</td>
</tr>
@ -6267,7 +6126,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestCliGdrivedb</td>
</tr>
@ -6297,7 +6156,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestEbookConvertCalibreGDrive</td>
</tr>
@ -6327,7 +6186,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestEbookConvertGDriveKepubify</td>
</tr>
@ -6375,7 +6234,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestEditAuthorsGdrive</td>
</tr>
@ -6411,7 +6270,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestEditBooksOnGdrive</td>
</tr>
@ -6453,7 +6312,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestEmbedMetadataGdrive</td>
</tr>
@ -6483,7 +6342,7 @@ AssertionError: False is not true</pre>
<tr>
<th>PyDrive2</th>
<td>1.20.0</td>
<td>1.21.1</td>
<td>TestSetupGdrive</td>
</tr>
@ -6561,7 +6420,7 @@ AssertionError: False is not true</pre>
</div>
<script>
drawCircle(508, 3, 5, 9);
drawCircle(514, 1, 1, 9);
showCase(5);
</script>