Skip to content

Commit

Permalink
Revert "allow e2e tests to pass https options"
Browse files Browse the repository at this point in the history
This reverts commit 06efeff.
  • Loading branch information
flotwig committed Jan 9, 2020
1 parent 06efeff commit f4e3b12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/https-proxy/lib/proxy.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
reset: ->
Server.reset()

httpsServer: (onRequest, options) ->
require("../test/helpers/https_server").create(onRequest, options)
httpsServer: (onRequest) ->
require("../test/helpers/https_server").create(onRequest)

}
5 changes: 2 additions & 3 deletions packages/https-proxy/test/helpers/https_server.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
_ = require('lodash')
https = require("https")
Promise = require("bluebird")
{ allowDestroy } = require("@packages/network")
Expand All @@ -14,8 +13,8 @@ defaultOnRequest = (req, res) ->

servers = []

create = (onRequest, options) ->
https.createServer(_.merge({}, certs, options), onRequest ? defaultOnRequest)
create = (onRequest) ->
https.createServer(certs, onRequest ? defaultOnRequest)

module.exports = {
create
Expand Down
4 changes: 2 additions & 2 deletions packages/server/test/support/helpers/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ const ensurePort = function (port) {

const startServer = function (obj) {
let s; let srv
const { onServer, port, https, httpsOptions } = obj
const { onServer, port, https } = obj

ensurePort(port)

const app = express()

if (https) {
srv = httpsProxy.httpsServer(app, httpsOptions)
srv = httpsProxy.httpsServer(app)
} else {
srv = http.Server(app)
}
Expand Down

0 comments on commit f4e3b12

Please sign in to comment.