[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-active
Subject: Re: Review Request 111162: Bodega-server: Add a test for puchasing an asset
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2013-06-21 21:28:05
Message-ID: 20130621212805.21302.85909 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111162/#review34840
-----------------------------------------------------------
these two points:
* confirm points are properly distributed between store and asset owners
* confirm download records are correct
will have to be done with raw sql. see the after function in store.sql for an example of how to run sql \
from tests directly against the database. queries can be done to pull the relevant information and test \
against it.
server/test/purchase.js
<http://git.reviewboard.kde.org/r/111162/#comment25530>
this should be made part of the `make test_data` run.. it should both process the testdata.sql file \
as well as copy over sets of test data into the appropriate location.
- Aaron J. Seigo
On June 21, 2013, 2:02 p.m., Antonis Tsiapaliokas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111162/
> -----------------------------------------------------------
>
> (Updated June 21, 2013, 2:02 p.m.)
>
>
> Review request for Bodega.
>
>
> Description
> -------
>
> The test should check for the following:
>
> * purchasing an asset the account does not have enough points for
> * purchase an asset the account does have enough points for
> * downloading the asset that was purchased
> * downloading an asset that costs points that was not purchased
> * downloading a free asset
>
> Things that are missing:
>
> * confirm points are properly distributed between store and asset owners
> * confirm download records are correct
>
>
> How can we verify the two above which are missing from the test?
>
>
> This addresses bug 320545.
> http://bugs.kde.org/show_bug.cgi?id=320545
>
>
> Diffs
> -----
>
> server/lib/db/purchaseAsset.js 2613615
> server/test/purchase.js PRE-CREATION
> server/test/support/http.js 84a5fee
> sql/testdata.sql d151c17
>
> Diff: http://git.reviewboard.kde.org/r/111162/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Antonis Tsiapaliokas
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/111162/">http://git.reviewboard.kde.org/r/111162/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">these two points:
* confirm points are properly distributed between store and asset owners
* confirm download records are correct
will have to be done with raw sql. see the after function in store.sql for an example of how to run sql \
from tests directly against the database. queries can be done to pull the relevant information and test \
against it.</pre> <br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: \
4px 8px; text-align: left;"> <a \
href="http://git.reviewboard.kde.org/r/111162/diff/1/?file=165003#file165003line113" style="color: black; \
font-weight: bold; text-decoration: underline;">server/test/purchase.js</a> <span style="font-weight: \
normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">113</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="nx">it</span><span \
class="p">(</span><span class="s1">'should create an empty file first'</span><span \
class="p">,</span> <span class="kd">function</span><span class="p">(</span><span \
class="nx">done</span><span class="p">)</span> <span class="p">{</span></pre></td> </tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">114</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="nx">fs</span><span \
class="p">.</span><span class="nx">openSync</span><span class="p">(</span><span \
class="nx">folderPath</span> <span class="o">+</span> <span \
class="s1">'org.kde.poker1.plasmoid'</span><span class="p">,</span> <span \
class="s1">'w'</span><span class="p">);</span></pre></td> </tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font \
size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; \
margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px \
solid #C0C0C0;" align="right"><font size="2">115</font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="nx">done</span><span \
class="p">();</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">this should be made part of the `make test_data` run.. \
it should both process the testdata.sql file as well as copy over sets of test data into the appropriate \
location.</pre> </div>
<br />
<p>- Aaron J.</p>
<br />
<p>On June 21st, 2013, 2:02 p.m. UTC, Antonis Tsiapaliokas wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black solid;"> <tr>
<td>
<div>Review request for Bodega.</div>
<div>By Antonis Tsiapaliokas.</div>
<p style="color: grey;"><i>Updated June 21, 2013, 2:02 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid \
#b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The test should check for the following:
* purchasing an asset the account does not have enough points for
* purchase an asset the account does have enough points for
* downloading the asset that was purchased
* downloading an asset that costs points that was not purchased
* downloading a free asset
Things that are missing:
* confirm points are properly distributed between store and asset owners
* confirm download records are correct
How can we verify the two above which are missing from the test?
</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=320545">320545</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>server/lib/db/purchaseAsset.js <span style="color: grey">(2613615)</span></li>
<li>server/test/purchase.js <span style="color: grey">(PRE-CREATION)</span></li>
<li>server/test/support/http.js <span style="color: grey">(84a5fee)</span></li>
<li>sql/testdata.sql <span style="color: grey">(d151c17)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111162/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Active mailing list
Active@kde.org
https://mail.kde.org/mailman/listinfo/active
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic