Skip to content

Bouncer tests #24

Merged
merged 3 commits into from Jan 10, 2013

3 participants

@brandonsavage

Initial pass at testing the new functionality.

@brandonsavage brandonsavage Preparing the code to be more easily unit testing in accordance with
our choice to unit test Bouncer. The following tasks were completed:

* Changing functions to be in a separate file to facilitate testing.
* Passing the SDO object directly into functions to facilitate the
  creation of a mock SDO object to uncouple Bouncer from a database
  during testing.
* The implementation of a recursive, stand-alone function for the
  querying of mirrors in the database, to facilitate testing this
  important functionality.
cc67ba3
@adngdb
Mozilla member
adngdb commented Dec 27, 2012

The file bouncer/tests/simpletest/.DS_Store shouldn't be there, I guess.

@fwenzel
Mozilla member
fwenzel commented Dec 27, 2012

You want to put this into your home dir:

% cat ~/.gitignore
.DS_Store
@adngdb adngdb commented on an outdated diff Jan 7, 2013
bouncer/tests/functions.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * To run this test from this directory:
+ * $ php -q sdo.php
+ * sdotest
+ * OK
+ * Test cases run: 1/1, Passes: 29, Failures: 0, Exceptions: 0
@adngdb
Mozilla member
adngdb added a note Jan 7, 2013

This doc is not up-to-date (and it says the file is sdo.php earlier).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adngdb
Mozilla member
adngdb commented Jan 7, 2013

I think this is r+, I have tested the website and seen no error, and running the unit tests gives me the same output than on master (but that sadly doesn't mean nothing is broken... ).

@brandonsavage brandonsavage merged commit e7b78a1 into mozilla:master Jan 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.