<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><font face="monospace">Yes. That's
        right.<br>
        <br>
        Also there is a unit test here [1] which mocks "ip netns exec".<br>
        <br>
        [1] -
<a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/145005/5/neutron_vpnaas/tests/unit/services/vpn/device_drivers/test_ipsec.py">https://review.openstack.org/#/c/145005/5/neutron_vpnaas/tests/unit/services/vpn/device_drivers/test_ipsec.py</a><br>
        <br>
        Thanks<br>
        Numan<br>
        <br>
      </font>On 01/21/2015 02:22 PM, Kevin Benton wrote:<br>
    </div>
    <blockquote
cite="mid:CAO_F6JN_T35KsuTonHnSvWo0xd256OqyBGUckC60BJnW6Bxnog@mail.gmail.com"
      type="cite">
      <div dir="ltr">So the test wouldn't make much sense then without
        the creation of the namespace, right? If that's the case, it
        sounds like it is a very low level functional test making sure
        that routes can be installed into namespaces. </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Jan 21, 2015 at 12:19 AM, Numan
          Siddique <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:numan.siddique@enovance.com" target="_blank">numan.siddique@enovance.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div><font face="monospace">It is asserting the return
                  value of "ip netns exec <ns> ip route get
                  <ip_address>".<br>
                  <br>
                  <br>
                  Thanks<span class="HOEnZb"><font color="#888888"><br>
                      Numan<br>
                      <br>
                      <br>
                    </font></span></font>
                <div>
                  <div class="h5">On 01/21/2015 12:34 PM, Kevin Benton
                    wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">Is the test asserting things about
                      interactions with the system, or does it just
                      happen to use a system call as a side effect of
                      one of the setups?</div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Tue, Jan 20, 2015 at
                        1:24 PM, Paul Michali <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:pc@michali.net" target="_blank">pc@michali.net</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">My question is whether the
                            tests proposed should be unit tests or
                            functional tests. They only test one method,
                            and it's not a complete piece of
                            functionality - like creating a VPN
                            connection.
                            <div><br>
                            </div>
                            <div>If that one system call is mocked,
                              these could all be treated as unit tests.
                              So I'm wondering if there is an advantage
                              in actually testing the system call
                              (getaddrinfo), as part of this work?</div>
                            <div><br>
                            </div>
                            <div><br>
                            </div>
                            <div>Thoughts?</div>
                          </div>
                          <div class="gmail_extra"><br clear="all">
                            <div>
                              <div>
                                <div dir="ltr">
                                  <div>
                                    <div dir="ltr">PCM (Paul Michali)</div>
                                    <div dir="ltr">
                                      <div><br>
                                      </div>
                                      <div>IRC............ pc_m (<a
                                          moz-do-not-send="true"
                                          href="http://irc.freenode.com"
                                          target="_blank">irc.freenode.com</a>)<br>
                                        Twitter....... @pmichali</div>
                                      <div><br>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <br>
                            <div class="gmail_quote"><span>On Tue, Jan
                                20, 2015 at 3:02 PM, Kevin Benton <span
                                  dir="ltr"><<a
                                    moz-do-not-send="true"
                                    href="mailto:blak111@gmail.com"
                                    target="_blank">blak111@gmail.com</a>></span>
                                wrote:<br>
                              </span>
                              <div>
                                <div>
                                  <blockquote class="gmail_quote"
                                    style="margin:0 0 0
                                    .8ex;border-left:1px #ccc
                                    solid;padding-left:1ex">
                                    <div dir="ltr">I don't believe we
                                      have any unit tests that create
                                      namespaces or veth pairs. This
                                      sounds like it belongs with
                                      functional tests.</div>
                                    <div class="gmail_extra"><br>
                                      <div class="gmail_quote">
                                        <div>
                                          <div>On Tue, Jan 20, 2015 at
                                            10:20 AM, Numan Siddique <span
                                              dir="ltr"><<a
                                                moz-do-not-send="true"
                                                href="mailto:numan.siddique@enovance.com"
                                                target="_blank">numan.siddique@enovance.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>
                                              <div bgcolor="#FFFFFF"
                                                text="#000000"> <font
                                                  face="monospace">Hello,<br>
                                                  <br>
                                                  I am working on a bug
                                                  [1] on neutron vpnaas
                                                  and submitted the
                                                  patch here [2].<br>
                                                  <br>
                                                  The test code to test
                                                  the fix does the
                                                  following<br>
                                                      - creates a
                                                  namespace<br>
                                                      - creates a veth
                                                  pair and add one
                                                  interface into the
                                                  namespace<br>
                                                      - configures the
                                                  interface with an ip
                                                  address and<br>
                                                      - adds a default
                                                  gateway<br>
                                                      - and of course
                                                  tests the code.<br>
                                                  <br>
                                                  This test code only
                                                  tests a specific
                                                  function (</font><font
                                                  face="monospace"> <span
style="color:rgb(102,0,102);font-family:monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;display:inline!important;float:none;background-color:rgb(255,255,255)">OpenSwanProcess.</span>_get_nexthop())<br>
                                                </font><font
                                                  face="monospace"><font
                                                    face="monospace"><br>
                                                    Reviewers of this
                                                    patch are not clear
                                                    if this should be
                                                    part of functional
                                                    tests or unit tests.<br>
                                                  </font>Can unit tests
                                                  create linux
                                                  namespaces, interfaces
                                                  etc or it falls under
                                                  functional tests?<br>
                                                   <br>
                                                  Please let me know
                                                  your thoughts on this.<br>
                                                  <br>
                                                  [1] - <a
                                                    moz-do-not-send="true"
href="https://bugs.launchpad.net/neutron/+bug/1405413" target="_blank">https://bugs.launchpad.net/neutron/+bug/1405413</a><br>
                                                  [2] - <a
                                                    moz-do-not-send="true"
href="https://review.openstack.org/#/c/145005/5" target="_blank">https://review.openstack.org/#/c/145005/5</a><br>
                                                  <br>
                                                  <br>
                                                  Regards<span><font
                                                      color="#888888"><br>
                                                      Numan<br>
                                                      <br>
                                                    </font></span></font>
                                              </div>
                                              <br>
                                            </div>
                                          </div>
__________________________________________________________________________<br>
                                          OpenStack Development Mailing
                                          List (not for usage questions)<br>
                                          Unsubscribe: <a
                                            moz-do-not-send="true"
href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe"
                                            target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
                                          <a moz-do-not-send="true"
                                            href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
                                            target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
                                          <br>
                                        </blockquote>
                                      </div>
                                      <span><font color="#888888"><br>
                                          <br clear="all">
                                          <div><br>
                                          </div>
                                          -- <br>
                                          <div>
                                            <div>Kevin Benton</div>
                                          </div>
                                        </font></span></div>
                                    <br>
__________________________________________________________________________<br>
                                    OpenStack Development Mailing List
                                    (not for usage questions)<br>
                                    Unsubscribe: <a
                                      moz-do-not-send="true"
href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe"
                                      target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
                                    <a moz-do-not-send="true"
                                      href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
                                      target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
                                    <br>
                                  </blockquote>
                                </div>
                              </div>
                            </div>
                            <br>
                          </div>
                          <br>
__________________________________________________________________________<br>
                          OpenStack Development Mailing List (not for
                          usage questions)<br>
                          Unsubscribe: <a moz-do-not-send="true"
href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe"
                            target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
                            target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <div><br>
                      </div>
                      -- <br>
                      <div>
                        <div>Kevin Benton</div>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a moz-do-not-send="true" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a moz-do-not-send="true" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
__________________________________________________________________________<br>
            OpenStack Development Mailing List (not for usage questions)<br>
            Unsubscribe: <a moz-do-not-send="true"
href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe"
              target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
            <a moz-do-not-send="true"
              href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
              target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">
          <div>Kevin Benton</div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>