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 #1342 from eiriksm/bug/fix-browser-tests
Add mock https server and redo start of browser tests for this purpose.
- Loading branch information
Showing
7 changed files
with
94 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICKTCCAZICCQDB/6lRlsirjzANBgkqhkiG9w0BAQUFADBZMQswCQYDVQQGEwJB | ||
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0 | ||
cyBQdHkgTHRkMRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMTUwMTA3MTcwODM2WhcN | ||
MjUwMTA0MTcwODM2WjBZMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0 | ||
ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRIwEAYDVQQDEwls | ||
b2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMba6FQ1VkgW8vWa | ||
FBxV1VdLhQ5HP0eKZ/CyEGG4r89CzfzC0+V3bnFWGBGF2kSJlVjc7eVSSVio383A | ||
inq3i+86Mavfy18BwcP4I0NqUSvvcV9yduBLUySklJhOlhhHeFUlycQyxuODbrG9 | ||
QOd411c4eccsbDHq5vSnS7AJh6tVAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAI0H3 | ||
bJIUQgnSGyrSHmjoKm66QLBPvQ1Zd7Zxjlg1uFv6glPOhdkeTQx9XQPT/WDG3qmJ | ||
BdHvQLDtPS9P8vRaiQW1OCP7dQJkVYCxyFbSQiieuzwBAEGtZcLdZbvcp3PKRGbx | ||
sIrkzyYdAXE1EZ5z7yLVcpWwTKnBnuRz2D0XOk4= | ||
-----END CERTIFICATE----- |
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,14 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICKTCCAZICCQDl9xx8ZXLMPTANBgkqhkiG9w0BAQUFADBZMQswCQYDVQQGEwJB | ||
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0 | ||
cyBQdHkgTHRkMRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMTUwMTA3MTcwOTQ4WhcN | ||
MjUwMTA0MTcwOTQ4WjBZMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0 | ||
ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRIwEAYDVQQDEwls | ||
b2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKWxvvLNi8AcT0wI | ||
sf+LoWAvtoIV29ypI6j1JRqmsPO433JP/ijLhJLFc6RKXpKs6pd4am82vzk8Bxs3 | ||
VtUXJ0yKh3KMevT7L4X1hw+QxvYAZD6Kl/kaNvKFTuAgcaeSnmnWGjQYLF/i20w7 | ||
7dpeXDmnNMCKwdg+kLeJdPtW0d+vAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADL6l | ||
Z2mDKj4kPyGD58uBGeBHjmcDA2oJcnsHhOiC1u1NuCwQW4RDWs6Ili0GhuHYHP0B | ||
JDcPw6ZSa1Gx3ZaUJ5yM/+YHpbLev34CjmiwQeG36DF2rAxfoIQk/wI4iWmu1+ed | ||
5Wwc0cZAb10uy0ihmMK98yhVQPmkBOEyw2O1xJw= | ||
-----END CERTIFICATE----- |
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,15 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIICXAIBAAKBgQClsb7yzYvAHE9MCLH/i6FgL7aCFdvcqSOo9SUaprDzuN9yT/4o | ||
y4SSxXOkSl6SrOqXeGpvNr85PAcbN1bVFydMiodyjHr0+y+F9YcPkMb2AGQ+ipf5 | ||
GjbyhU7gIHGnkp5p1ho0GCxf4ttMO+3aXlw5pzTAisHYPpC3iXT7VtHfrwIDAQAB | ||
AoGBAJa5edmk4NuA5SFlR4YOnl3BCWSMPdQciDPJzFbSC2WpZpm16p1xhMd+lhN9 | ||
E0qZwUzIXQmN46VM1aoMTRDKXxPqujUIvhn7kxMLmD8lajHzFUIhgnp1XQCfxIIV | ||
sCcnIoP+cbnzP+AegAEPjds/0ngI3YM28UeooqZAmZCHQ0cBAkEAz0go7tCxXqED | ||
+cY+P2axAKuGR+6srx08g5kONTpUx8jXr4su02F376dxhPB9UXWOJkYiGEBwKEds | ||
OnUSNTF/RQJBAMyjUzjb/u6sZqTcHd3owes3UsCC+kfSb814qdG3Z9qYX9p55ESu | ||
hA7Sbjq0WdTHGZdgEexwpfLtTRS8x5ldiGMCQFC3GLlmKqtep92rhLHLm0FXiYKZ | ||
PkUybU4RW6b+f+UMIHELEcDeQ4Xe/iV2QFZoIGJnDP/El+gXZ92bmOt9ysECQD/i | ||
zVx28gO5NuJJBdn9jGzOfLs1KMW7YMQY44thYr7Pyzz9yNHYWcn20Arruw++iLLF | ||
f1L9aBGLHAFZXkb2+FkCQA5/3Z3SgiZrRYX/bWcNe6N65+nGfJv8ZBVsX13pKOxR | ||
8JzJLyEmx67IOGZvVgfVABrCHJvTrKlUO3x3mDoEPzI= | ||
-----END RSA PRIVATE KEY----- |
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,36 @@ | ||
'use strict' | ||
var spawn = require('child_process').spawn | ||
var https = require('https') | ||
var fs = require('fs') | ||
var path = require('path') | ||
|
||
var port = 6767 | ||
|
||
var server = https.createServer({ | ||
key: fs.readFileSync(path.join(__dirname, '/ssl/server.key')), | ||
cert: fs.readFileSync(path.join(__dirname, '/ssl/server.crt')), | ||
ca: fs.readFileSync(path.join(__dirname, '/ssl/ca.crt')), | ||
requestCert: true, | ||
rejectUnauthorized: false | ||
}, function (req, res) { | ||
// Set CORS header, since that is something we are testing. | ||
res.setHeader('Access-Control-Allow-Origin', '*') | ||
res.writeHead(200) | ||
res.end('Can you hear the sound of an enormous door slamming in the depths of hell?\n') | ||
}) | ||
server.listen(port, function() { | ||
console.log('Started https server for karma tests on port ' + port) | ||
// Spawn process for karma. | ||
var c = spawn('karma', [ | ||
'start', | ||
path.join(__dirname, '/karma.conf.js') | ||
]) | ||
c.stdout.pipe(process.stdout) | ||
c.on('exit', function(c) { | ||
// Exit process with karma exit code. | ||
if (c !== 0) { | ||
throw new Error('Karma exited with status code ' + c) | ||
} | ||
server.close() | ||
}) | ||
}) |
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