-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from sandstorm-io/run-unit-tests-on-travis
Run unit tests on travis
- Loading branch information
Showing
14 changed files
with
316 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/python | ||
import sys | ||
import os | ||
|
||
from twisted.internet import stdio, reactor | ||
from twisted.protocols import basic | ||
|
||
class Echo(basic.LineReceiver): | ||
from os import linesep as delimiter | ||
|
||
def exitWithStatusCode(self): | ||
print 'trying to exit' | ||
if self.all_good: | ||
os._exit(0) | ||
else: | ||
os._exit(1) | ||
|
||
def _done(self): | ||
print 'in _done' | ||
os.system('killall -9 node') | ||
reactor.removeAll() | ||
reactor.stop() | ||
|
||
def connectionMade(self): | ||
self.all_good = True | ||
|
||
def lineReceived(self, line): | ||
self.sendLine(line) | ||
|
||
if 'FAIL' in line: | ||
self.all_good = False | ||
self.sendLine("NOTICED A FAILURE!") | ||
reactor.callLater(0.1, self._done) | ||
print 'called later' | ||
|
||
if 'time to exit' in line: | ||
reactor.callLater(0.1, self._done) | ||
|
||
def main(): | ||
e = Echo() | ||
stdio.StandardIO(e) | ||
from twisted.internet import reactor | ||
reactor.run() | ||
e.exitWithStatusCode() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ aldeed:collection2 | |
random | ||
meteorhacks:ssr | ||
sanjo:jasmine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-----BEGIN CERTIFICATE REQUEST----- | ||
MIICrTCCAZUCAQAwaDELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx | ||
ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEhMB8GA1UEAwwYZXhh | ||
bXBsZXVzZXIyLnNhbmRjYXR6LmlvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB | ||
CgKCAQEArYCEJjYYgpvfSuhfC5qVVn6KZNxfEF4/eobsZy9MggL9cAjNfnoWaMKz | ||
mjwG3QFUX0JhKgLAH2P69OfQIY14A2bvy8INV3ZiuvmUWJa0mn9NiAFWtBi+SJUE | ||
UTMuf1ZmZT6cLRFvmHxLy8DRGDZlhtEbiRSyX+oZZq3rbgtWcyX3lMCKRtpvMrgZ | ||
xLw/9lYxVqdnCMb04n7V6Kk07qequUQUwLPL/Uu/N85HRFKo1Sue/+ISsqgL1YmS | ||
/i9I5C8O3mfwdgzGjj+1lsHXRLxnfUaB5j86GWOreNaEsRv7IpsYWrXQwTxbFSev | ||
Rc0hES5x5WsNGyDIG87PdcEI8Vh+gwIDAQABoAAwDQYJKoZIhvcNAQELBQADggEB | ||
AF5wbFMFUvWSS8jxcdw4ZcgNyzms55eMdxNlDxlTkSOPafRKrU0cg300VSPlQKNz | ||
Tm4XDI3IAeGFxNnZwcobYQ7kisRnKnng7gX6MWzDCwMyVR3TP9US5847pJOP2aRx | ||
xOUndGxEI6QcPgTJRKkTWeK1AIfTLxYkvbwNg69X/bVqrdhszbkRC6VlxiKrypZl | ||
WAfEynAFAg0KUjZFt6UJkzcqVHqllAdxAyWaWjG4KVXgLKKAAy7t9S3wEtn4Qq+K | ||
i4/hRj+vF1XtS1NMs9hEJlk03JZRC5CSP8eak2ba7kcAx2/5WmtJ4bMZL/ByFOZ4 | ||
q7QlW9yjdWiiA2+k9PRBGhE= | ||
-----END CERTIFICATE REQUEST----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Code that deals with parsing data out of certificates lives here. | ||
var pem = Meteor.npmRequire('pem'); | ||
var readCertificateInfo = Meteor.wrapAsync(pem.readCertificateInfo); | ||
|
||
getCommonNameFromCsr = function(csrData) { | ||
// readCertificateInfo() can crash if csrData is empty, so | ||
// we work around that here. | ||
if (!csrData) { | ||
return ""; | ||
} | ||
|
||
try { | ||
return readCertificateInfo(csrData).commonName || ""; | ||
} catch (error) { | ||
console.error(error); | ||
return ""; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"mysql": "2.5.4" | ||
"mysql": "2.5.4", | ||
"pem": "1.7.2", | ||
"soap": "0.9.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.