Skip to content

Commit

Permalink
Merge pull request #52 from pulsar-edit/specs-electron-12-headers-not…
Browse files Browse the repository at this point in the history
…-node-10

spec: Fixtures Node v10.20.1 --> Electron v12.2.3
  • Loading branch information
DeeDeeG authored Jan 24, 2023
2 parents 8cd6ab8 + e43f3d2 commit 4645ba2
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 60 deletions.
21 changes: 10 additions & 11 deletions spec/ci-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ express = require 'express'
wrench = require 'wrench'
CSON = require 'season'
apm = require '../lib/apm-cli'
nodeVersion = require('./config.json').nodeVersion

describe 'apm ci', ->
[atomHome, resourcePath, server] = []
Expand All @@ -23,16 +24,14 @@ describe 'apm ci', ->
delete process.env.npm_config_cache

app = express()
app.get '/node/v10.20.1/node-v10.20.1.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1.tar.gz')
app.get '/node/v10.20.1/node-v10.20.1-headers.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1-headers.tar.gz')
app.get '/node/v10.20.1/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node.lib')
app.get '/node/v10.20.1/x64/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node_x64.lib')
app.get '/node/v10.20.1/SHASUMS256.txt', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'SHASUMS256.txt')
app.get "/node/#{nodeVersion}/node-#{nodeVersion}-headers.tar.gz", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', "node-#{nodeVersion}-headers.tar.gz")
app.get "/node/#{nodeVersion}/win-x86/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node.lib')
app.get "/node/#{nodeVersion}/win-x64/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node_x64.lib')
app.get "/node/#{nodeVersion}/SHASUMS256.txt", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'SHASUMS256.txt')
app.get '/test-module-with-dependencies', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'install-locked-version.json')
app.get '/test-module', (request, response) ->
Expand All @@ -52,7 +51,7 @@ describe 'apm ci', ->
server.listen 3000, '127.0.0.1', ->
process.env.ATOM_ELECTRON_URL = "http://localhost:3000/node"
process.env.ATOM_PACKAGES_URL = "http://localhost:3000/packages"
process.env.ATOM_ELECTRON_VERSION = 'v10.20.1'
process.env.ATOM_ELECTRON_VERSION = nodeVersion
process.env.npm_config_registry = 'http://localhost:3000/'
live = true
waitsFor -> live
Expand Down
21 changes: 10 additions & 11 deletions spec/clean-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ express = require 'express'
http = require 'http'
wrench = require 'wrench'
apm = require '../lib/apm-cli'
nodeVersion = require('./config.json').nodeVersion

describe 'apm clean', ->
[moduleDirectory, server] = []
Expand All @@ -15,16 +16,14 @@ describe 'apm clean', ->

app = express()

app.get '/node/v10.20.1/node-v10.20.1.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1.tar.gz')
app.get '/node/v10.20.1/node-v10.20.1-headers.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1-headers.tar.gz')
app.get '/node/v10.20.1/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node.lib')
app.get '/node/v10.20.1/x64/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node_x64.lib')
app.get '/node/v10.20.1/SHASUMS256.txt', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'SHASUMS256.txt')
app.get "/node/#{nodeVersion}/node-#{nodeVersion}-headers.tar.gz", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', "node-#{nodeVersion}-headers.tar.gz")
app.get "/node/#{nodeVersion}/win-x86/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node.lib')
app.get "/node/#{nodeVersion}/win-x64/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node_x64.lib')
app.get "/node/#{nodeVersion}/SHASUMS256.txt", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'SHASUMS256.txt')
app.get '/test-module', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'install-test-module.json')
app.get '/tarball/test-module-1.2.0.tgz', (request, response) ->
Expand All @@ -38,7 +37,7 @@ describe 'apm clean', ->
atomHome = temp.mkdirSync('apm-home-dir-')
process.env.ATOM_HOME = atomHome
process.env.ATOM_ELECTRON_URL = "http://localhost:3000/node"
process.env.ATOM_ELECTRON_VERSION = 'v10.20.1'
process.env.ATOM_ELECTRON_VERSION = nodeVersion
process.env.npm_config_registry = 'http://localhost:3000/'

moduleDirectory = path.join(temp.mkdirSync('apm-test-module-'), 'test-module-with-dependencies')
Expand Down
4 changes: 4 additions & 0 deletions spec/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"nodeVersion": "v12.2.3",
"node-version-comment": "Note: This 'nodeVersion' string is used by various spec files. Update it to match, if/when the related (Node dist) fixture files (node[...]headers.tar.gz, node[_x64].lib, and SHASUMS256.txt) are updated for a new Node or Electron version."
}
4 changes: 0 additions & 4 deletions spec/fixtures/SHASUMS256.txt

This file was deleted.

13 changes: 13 additions & 0 deletions spec/fixtures/node-dist/SHASUMS256.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
092a039e403f758f542a0f801acac8604e2d7a9b63d8f3c8c31df71c7ba8aac5 node-v12.2.3.tar.gz
092a039e403f758f542a0f801acac8604e2d7a9b63d8f3c8c31df71c7ba8aac5 node-v12.2.3-headers.tar.gz
092a039e403f758f542a0f801acac8604e2d7a9b63d8f3c8c31df71c7ba8aac5 iojs-v12.2.3.tar.gz
092a039e403f758f542a0f801acac8604e2d7a9b63d8f3c8c31df71c7ba8aac5 iojs-v12.2.3-headers.tar.gz
4c59ee4f9b78dfdd904cc211080acbbc485104d467c29df24bf45c4017ef638e node.lib
248a81dd4d5cdaf8c0497a4f6c6855c1e2db3e0439757bfed4f2c1e3c530d04e x64/node.lib
4c59ee4f9b78dfdd904cc211080acbbc485104d467c29df24bf45c4017ef638e win-x86/iojs.lib
248a81dd4d5cdaf8c0497a4f6c6855c1e2db3e0439757bfed4f2c1e3c530d04e win-x64/iojs.lib
4c59ee4f9b78dfdd904cc211080acbbc485104d467c29df24bf45c4017ef638e win-x86/node.lib
248a81dd4d5cdaf8c0497a4f6c6855c1e2db3e0439757bfed4f2c1e3c530d04e win-x64/node.lib
8552821153af0eb55643f9c370ca35b1e5427c06ca51cd81c53db98d28af9494 arm64/node.lib
8552821153af0eb55643f9c370ca35b1e5427c06ca51cd81c53db98d28af9494 win-arm64/iojs.lib
8552821153af0eb55643f9c370ca35b1e5427c06ca51cd81c53db98d28af9494 win-arm64/node.lib
Binary file not shown.
Binary file added spec/fixtures/node-dist/node.lib
Binary file not shown.
Binary file added spec/fixtures/node-dist/node_x64.lib
Binary file not shown.
Binary file removed spec/fixtures/node-v10.20.1-headers.tar.gz
Binary file not shown.
Binary file removed spec/fixtures/node-v10.20.1.tar.gz
Binary file not shown.
Binary file removed spec/fixtures/node.lib
Binary file not shown.
Binary file removed spec/fixtures/node_x64.lib
Binary file not shown.
21 changes: 10 additions & 11 deletions spec/install-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ http = require 'http'
wrench = require 'wrench'
apm = require '../lib/apm-cli'
Install = require '../lib/install'
nodeVersion = require('./config.json').nodeVersion

describe 'apm install', ->
[atomHome, resourcePath] = []
Expand All @@ -29,16 +30,14 @@ describe 'apm install', ->

beforeEach ->
app = express()
app.get '/node/v10.20.1/node-v10.20.1.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1.tar.gz')
app.get '/node/v10.20.1/node-v10.20.1-headers.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1-headers.tar.gz')
app.get '/node/v10.20.1/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node.lib')
app.get '/node/v10.20.1/x64/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node_x64.lib')
app.get '/node/v10.20.1/SHASUMS256.txt', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'SHASUMS256.txt')
app.get "/node/#{nodeVersion}/node-#{nodeVersion}-headers.tar.gz", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', "node-#{nodeVersion}-headers.tar.gz")
app.get "/node/#{nodeVersion}/win-x86/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node.lib')
app.get "/node/#{nodeVersion}/win-x64/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node_x64.lib')
app.get "/node/#{nodeVersion}/SHASUMS256.txt", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'SHASUMS256.txt')
app.get '/test-module', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'install-test-module.json')
app.get '/tarball/test-module-1.1.0.tgz', (request, response) ->
Expand Down Expand Up @@ -78,7 +77,7 @@ describe 'apm install', ->
process.env.ATOM_HOME = atomHome
process.env.ATOM_ELECTRON_URL = "http://localhost:3000/node"
process.env.ATOM_PACKAGES_URL = "http://localhost:3000/packages"
process.env.ATOM_ELECTRON_VERSION = 'v10.20.1'
process.env.ATOM_ELECTRON_VERSION = nodeVersion
process.env.npm_config_registry = 'http://localhost:3000/'
live = true
waitsFor -> live
Expand Down
21 changes: 10 additions & 11 deletions spec/rebuild-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ express = require 'express'
http = require 'http'
wrench = require 'wrench'
apm = require '../lib/apm-cli'
nodeVersion = require('./config.json').nodeVersion

describe 'apm rebuild', ->
[server, originalPathEnv] = []
Expand All @@ -15,16 +16,14 @@ describe 'apm rebuild', ->
silenceOutput()

app = express()
app.get '/node/v10.20.1/node-v10.20.1.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1.tar.gz')
app.get '/node/v10.20.1/node-v10.20.1-headers.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1-headers.tar.gz')
app.get '/node/v10.20.1/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node.lib')
app.get '/node/v10.20.1/x64/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node_x64.lib')
app.get '/node/v10.20.1/SHASUMS256.txt', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'SHASUMS256.txt')
app.get "/node/#{nodeVersion}/node-#{nodeVersion}-headers.tar.gz", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', "node-#{nodeVersion}-headers.tar.gz")
app.get "/node/#{nodeVersion}/win-x86/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node.lib')
app.get "/node/#{nodeVersion}/win-x64/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node_x64.lib')
app.get "/node/#{nodeVersion}/SHASUMS256.txt", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'SHASUMS256.txt')

server = http.createServer(app)

Expand All @@ -34,7 +33,7 @@ describe 'apm rebuild', ->
process.env.ATOM_HOME = atomHome
process.env.ATOM_ELECTRON_URL = "http://localhost:3000/node"
process.env.ATOM_PACKAGES_URL = "http://localhost:3000/packages"
process.env.ATOM_ELECTRON_VERSION = 'v10.20.1'
process.env.ATOM_ELECTRON_VERSION = nodeVersion
process.env.ATOM_RESOURCE_PATH = temp.mkdirSync('atom-resource-path-')

originalPathEnv = process.env.PATH
Expand Down
21 changes: 10 additions & 11 deletions spec/stars-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ fs = require 'fs-plus'
http = require 'http'
temp = require 'temp'
apm = require '../lib/apm-cli'
nodeVersion = require('./config.json').nodeVersion

describe 'apm stars', ->
[atomHome, server] = []
Expand All @@ -17,16 +18,14 @@ describe 'apm stars', ->
response.sendFile path.join(__dirname, 'fixtures', 'available.json')
app.get '/users/hubot/stars', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'stars.json')
app.get '/node/v10.20.1/node-v10.20.1.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1.tar.gz')
app.get '/node/v10.20.1/node-v10.20.1-headers.tar.gz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-v10.20.1-headers.tar.gz')
app.get '/node/v10.20.1/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node.lib')
app.get '/node/v10.20.1/x64/node.lib', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node_x64.lib')
app.get '/node/v10.20.1/SHASUMS256.txt', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'SHASUMS256.txt')
app.get "/node/#{nodeVersion}/node-#{nodeVersion}-headers.tar.gz", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', "node-#{nodeVersion}-headers.tar.gz")
app.get "/node/#{nodeVersion}/win-x86/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node.lib')
app.get "/node/#{nodeVersion}/win-x64/node.lib", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'node_x64.lib')
app.get "/node/#{nodeVersion}/SHASUMS256.txt", (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'node-dist', 'SHASUMS256.txt')
app.get '/tarball/test-module-1.2.0.tgz', (request, response) ->
response.sendFile path.join(__dirname, 'fixtures', 'test-module-1.2.0.tgz')
app.get '/tarball/test-module2-2.0.0.tgz', (request, response) ->
Expand All @@ -43,7 +42,7 @@ describe 'apm stars', ->
process.env.ATOM_API_URL = "http://localhost:3000"
process.env.ATOM_ELECTRON_URL = "http://localhost:3000/node"
process.env.ATOM_PACKAGES_URL = "http://localhost:3000/packages"
process.env.ATOM_ELECTRON_VERSION = 'v10.20.1'
process.env.ATOM_ELECTRON_VERSION = nodeVersion
process.env.npm_config_registry = 'http://localhost:3000/'

live = true
Expand Down
3 changes: 2 additions & 1 deletion spec/upgrade-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ express = require 'express'
http = require 'http'
wrench = require 'wrench'
apm = require '../lib/apm-cli'
nodeVersion = require('./config.json').nodeVersion

apmRun = (args, callback) ->
ran = false
Expand Down Expand Up @@ -39,7 +40,7 @@ describe "apm upgrade", ->
process.env.ATOM_HOME = atomHome
process.env.ATOM_ELECTRON_URL = "http://localhost:3000/node"
process.env.ATOM_PACKAGES_URL = "http://localhost:3000/packages"
process.env.ATOM_ELECTRON_VERSION = 'v10.20.1'
process.env.ATOM_ELECTRON_VERSION = nodeVersion
process.env.ATOM_RESOURCE_PATH = atomApp

fs.writeFileSync(path.join(atomApp, 'package.json'), JSON.stringify(version: '0.10.0'))
Expand Down

0 comments on commit 4645ba2

Please sign in to comment.