<div dir="ltr">Another aspect to this topic: we talked about that it would be a big plus if we could run the E2E tests against a deployable container set as well as the production version. Maybe this changes how we mock/not mock the authN.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 28, 2016 at 11:44 AM, Aslak Knutsen <span dir="ltr"><<a href="mailto:aslak@redhat.com" target="_blank">aslak@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">In "Continuous Enterprise Development in Java" we didn't fake it, we actually did a full-scale login. We did it in the background as an Arquillian extension to avoid the TestCase having to care about it. The test case was written without security in mind, but security was enabled in the background if setup required it. (e.g. same test case could be used as an integration and full functional test)<div><br></div><div>Example using htmlunit to do a login cycle to get a session/token using Twitter as provider:</div><div><a href="https://github.com/arquillian/continuous-enterprise-development/blob/master/code/application/service/security/src/test/java/org/cedj/geekseek/service/security/test/arquillian/TwitterLogin.java" target="_blank">https://github.com/arquillian/<wbr>continuous-enterprise-<wbr>development/blob/master/code/<wbr>application/service/security/<wbr>src/test/java/org/cedj/<wbr>geekseek/service/security/<wbr>test/arquillian/TwitterLogin.<wbr>java</a><br></div><div><br></div><div>It requires the username/password secrets to run, but that's the only way as far as I know to do a full test.</div><div><br></div><div>Depending on the level of testing you're asking for, there is a REST API to call to get valid tokens that are open if you run the server in dev mode:</div><div><br></div><div>    ALMIGHTY_DEVELOPER_MODE_<wbr>ENABLED=1 ./bin/alm</div><div><br></div><div>    <a href="http://localhost:8080/api/login/generate" target="_blank">http://localhost:8080/api/<wbr>login/generate</a></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>-aslak-</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 27, 2016 at 3:50 PM, Konrad Kleine <span dir="ltr"><<a href="mailto:kkleine@redhat.com" target="_blank">kkleine@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Len,<div><br></div><div>a quick search for OAuth Test revealed a site that seems to provide a test server: <a href="http://term.ie/oauth/example/" target="_blank">http://term.ie/oauth/e<wbr>xample/</a> and a test client: <a href="http://term.ie/oauth/example/client.php" target="_blank">http://term.ie/oauth/e<wbr>xample/client.php</a></div><div><br></div><div>Maybe this is worth looking into.</div><div><br></div><div>Regards,</div><div>Konrad</div><div><br></div><div><br></div></div><div class="m_-7871505360181879025HOEnZb"><div class="m_-7871505360181879025h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 27, 2016 at 3:28 PM, Michael Kleinhenz <span dir="ltr"><<a href="mailto:kleinhenz@redhat.com" target="_blank">kleinhenz@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>Can we mock the GitHub AuthN? It's just oAuth, right?<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-7871505360181879025m_-5976601005844650930h5">On Thu, Oct 27, 2016 at 3:08 PM, Leonard Dimaggio <span dir="ltr"><<a href="mailto:ldimaggi@redhat.com" target="_blank">ldimaggi@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-7871505360181879025m_-5976601005844650930h5"><div dir="ltr"><div><div><div><div>Hey everyone,<br><br></div>I wanted to get input from people on the best way to mock/simulate a login to ALMighty for testing. We currently use a fake login for these tests (<a href="https://github.com/almighty/almighty-ui/tree/master/src/tests/work-item/work-item-list" target="_blank">https://github.com/almighty/a<wbr>lmighty-ui/tree/master/src/tes<wbr>ts/work-item/work-item-list</a>) - but we also want to be able to automate the testing of actual logins. <br><br></div>Please reply all with ideas - suggestions, etc. <br><br></div>Thanks!,<br></div>Len D.<span class="m_-7871505360181879025m_-5976601005844650930m_-7896424264494845271HOEnZb"><font color="#888888"><br><div><div><div><div><div><br><br clear="all"><br>-- <br><div class="m_-7871505360181879025m_-5976601005844650930m_-7896424264494845271m_1488640311944378819gmail_signature"><div dir="ltr"><div><div dir="ltr">Len DiMaggio (<a href="mailto:ldimaggi@redhat.com" target="_blank">ldimaggi@redhat.com</a>)<br>JBoss by Red Hat<br>314 Littleton Road<br>Westford, MA 01886  USA<br>tel:  <a href="tel:978.392.3179" value="+19783923179" target="_blank">978.392.3179</a><br>cell: <a href="tel:781.472.9912" value="+17814729912" target="_blank">781.472.9912</a><br><a href="http://www.redhat.com" target="_blank">http://www.redhat.com</a><br><a href="http://community.jboss.org/people/ldimaggio" target="_blank">http://community.jboss.org/peo<wbr>ple/ldimaggio</a><br><br><img src="http://www.redhat.com/g/logos/RedHat_JBoss_logo.png"><br></div></div></div></div>
</div></div></div></div></div></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
almighty-public mailing list<br>
<a href="mailto:almighty-public@redhat.com" target="_blank">almighty-public@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/almighty-public" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/almighty-public</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-7871505360181879025m_-5976601005844650930m_-7896424264494845271gmail_signature" data-smartmail="gmail_signature">Michael Kleinhenz<br>Principal Software Engineer<br><br>Red Hat Deutschland GmbH<br>Werner-von-Siemens-Ring 14<br>85630 Grasbrunn<br>Germany<br> <br>RED HAT | TRIED. TESTED. TRUSTED.<br>Red Hat GmbH, <a href="http://www.de.redhat.com" target="_blank">www.de.redhat.com</a>, <br>Registered seat: Grasbrunn, Commercial register: Amtsgericht München, HRB 153243,<br>Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill</div>
</div>
<br>______________________________<wbr>_________________<br>
almighty-public mailing list<br>
<a href="mailto:almighty-public@redhat.com" target="_blank">almighty-public@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/almighty-public" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/almighty-public</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
almighty-public mailing list<br>
<a href="mailto:almighty-public@redhat.com" target="_blank">almighty-public@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/almighty-public" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/almighty-public</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Michael Kleinhenz<br>Principal Software Engineer<br><br>Red Hat Deutschland GmbH<br>Werner-von-Siemens-Ring 14<br>85630 Grasbrunn<br>Germany<br> <br>RED HAT | TRIED. TESTED. TRUSTED.<br>Red Hat GmbH, <a href="http://www.de.redhat.com" target="_blank">www.de.redhat.com</a>, <br>Registered seat: Grasbrunn, Commercial register: Amtsgericht München, HRB 153243,<br>Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill</div>
</div>