Skip to content

Commit 7552b6d

Browse files
committed
No need to use HTTPS server for tests (since it's localhost)
1 parent 36c55ad commit 7552b6d

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

test/server.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var webPush = require('../index');
2-
var https = require('https');
2+
var http = require('http');
33
var fs = require('fs');
44
var path = require('path');
55
var colors = require('colors');
@@ -11,15 +11,8 @@ if (!process.env.GCM_API_KEY) {
1111
webPush.setGCMAPIKey(process.env.GCM_API_KEY);
1212
}
1313

14-
var pem = fs.readFileSync('test/cert.pem');
15-
16-
var options = {
17-
key: pem,
18-
cert: pem,
19-
};
20-
2114
function createServer(pushPayload, vapid) {
22-
var server = https.createServer(options, function(req, res) {
15+
var server = http.createServer(function(req, res) {
2316
if (req.method === 'GET') {
2417
if (req.url === '/') {
2518
req.url = '/index.html';

test/testSelenium.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ suite('selenium', function() {
7777
if (typeof netscape !== 'undefined') {
7878
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
7979
Components.utils.import('resource://gre/modules/Services.jsm');
80-
var uri = Services.io.newURI('https://127.0.0.1:' + port, null, null);
80+
var uri = Services.io.newURI('http://127.0.0.1:' + port, null, null);
8181
var principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri);
8282
Services.perms.addFromPrincipal(principal, 'desktop-notification', Services.perms.ALLOW_ACTION);
8383
}
8484
}, server.port);
8585

86-
driver.get('https://127.0.0.1:' + server.port);
86+
driver.get('http://127.0.0.1:' + server.port);
8787

8888
driver.executeScript(function(port) {
89-
serverAddress = 'https://127.0.0.1:' + port;
89+
serverAddress = 'http://127.0.0.1:' + port;
9090
go();
9191
}, server.port);
9292

0 commit comments

Comments
 (0)