-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix an issue with CORS when a preflight request has an empty headers list. Without this fix, azurite would fail because it was trying to call request.httpProps[N.ACCESS_CONTROL_REQUEST_HEADERS].toLowerCase() which will result in trying to call undefined.toLowerCase() if the preflight request doesn't specify access-control-request-headers. In addition, when validating a request against the CORS, the request would fail to be validated if access-control-request-headers was empty. * fixed so that when requesting single entity with PartitionKey and RowKey the emulator responds in the same way that the real azure table * Always set the copyProgress field. * Entity generator now accepts optional partition and row key * Dockerfile: deterministic builds Use explicit version tag 10.6-alpine instead of alpine to ensure a known version is used. Copy package-lock.json before npm install to ensure known dependencies are installed. * Fixed #47 Copied blob has incorrect content type * Update release-notes.md * Added Azure/azure-storage-node as test submodule Tests from azure-storage-node are invoked via test/azure-storage-shim.js for direct npm run test support. Submodule needs to be initialized with git submodule update --init first. * Fix environment variable configuration Added env-cmd package and test/.env to automatically set envs for testing. * Fix NOCK_OFF env and separate test folders * Focus on test subset for easier fixing * Updates to testing, requires changes to vscode launch.json with correct env args for each storage-node test, to ensure no nock etc * Updated documentation for Azure storage testing * Update azure-storage-node_tdd.md * Updates to Table Storage API and associated tests (#78) * Updated Readme and Package files * Updates to table storage API and created corresponding tests using Azure-storage-node, this will form the basis of fixing further table API issues currently logged * fixed up singleEntity response for QueryEntites action to return to method used by Karl Persson * small correction to test logic * Fixes for table queries not returning 404 for missing entities (#80) * Updated Readme and Package files * Updates to table storage API and created corresponding tests using Azure-storage-node, this will form the basis of fixing further table API issues currently logged * fixed up singleEntity response for QueryEntites action to return to method used by Karl Persson * small correction to test logic * Changes to correctly return 404 for missing entities and failed queries. * Updates errorCodes with EntityNotFound, updated tests * minor updates to obj assignments * added test to validate insertEntity returns Etag in metadata * added jsHint config * Updated table service error codes * Corrected a few variable definitions let vs const * Prettier Config for pull request * fixed Create Entity Response to begin to conform to Azure Storage Response, we might need to do some more work here, but this should be enough for basic API functionality (#83) * Update .prettierrc.json * now everything is pretty, but still needs some refactoring * Revert "now everything is pretty, but still needs some refactoring" This reverts commit 4524b3b. Need to rebase on dev branch before making super pretty... * rebased onto dev and then pretified * package.json update * Prettier applied to conflicting files
- Loading branch information
1 parent
4009e7b
commit 9413bd7
Showing
194 changed files
with
9,990 additions
and
7,406 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "test/azure-storage-node"] | ||
path = externaltests/azure-storage-node | ||
url = https://github.com/Azure/azure-storage-node |
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,3 @@ | ||
node_modules/* | ||
packages | ||
.git |
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,21 @@ | ||
{ | ||
"esversion": 6, | ||
"bitwise": true, | ||
"curly": false, | ||
"eqeqeq": false, | ||
"forin": true, | ||
"latedef": true, | ||
"maxparams": false, | ||
"maxdepth": false, | ||
"maxstatements": false, | ||
"maxcomplexity": false, | ||
"noarg": true, | ||
"node": true, | ||
"nonew": true, | ||
"plusplus": false, | ||
"strict": false, | ||
"trailingcomma": true, | ||
"undef": true, | ||
"unused": true, | ||
"shadow": "inner" | ||
} |
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,7 @@ | ||
package.json | ||
package-lock.json | ||
azurite-testdrive/ | ||
externaltests/azure-storage-node/ | ||
node_modules/ | ||
.vscode/ | ||
nuget/ |
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 @@ | ||
{ | ||
"printWidth": 80, | ||
"parser": "typescript", | ||
"arrowParens" : "always", | ||
"tabWidth": 2, | ||
"useTabs":false, | ||
"semi":true, | ||
"singleQuote": false, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"requirePragma": false, | ||
"insertPragma": true, | ||
"proseWrap": "never" | ||
} |
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 |
---|---|---|
@@ -1,59 +1,67 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
"use strict"; | ||
|
||
const BbPromise = require('bluebird'); | ||
const BbPromise = require("bluebird"); | ||
|
||
process.on('unhandledRejection', (e) => { | ||
console.error('**PANIC** Something unexpected happened! Emulator may be in an inconsistent state!'); | ||
console.error(e); | ||
process.on("unhandledRejection", (e) => { | ||
console.error( | ||
"**PANIC** Something unexpected happened! Emulator may be in an inconsistent state!" | ||
); | ||
console.error(e); | ||
}); | ||
process.noDeprecation = true; | ||
|
||
(() => BbPromise.resolve().then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require('minimist')(process.argv.slice(2)), | ||
env = require('./../lib/core/env'), | ||
cli = require('./../lib/core/cli'); | ||
(() => | ||
BbPromise.resolve() | ||
.then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require("minimist")(process.argv.slice(2)), | ||
env = require("./../lib/core/env"), | ||
cli = require("./../lib/core/cli"); | ||
|
||
return env.init(argv) | ||
return env | ||
.init(argv) | ||
.then(() => { | ||
if (!env.silent) { | ||
cli.asciiGreeting(); | ||
} | ||
if (!env.silent) { | ||
cli.asciiGreeting(); | ||
} | ||
}) | ||
.then(() => { | ||
// Forking individual modules to spread them across different cores if possible | ||
// and restarting them automatically in case of a crash. | ||
const fork = require('child_process').fork; | ||
|
||
(function forkBlobModule(code, signal) { | ||
const mod = fork(env.blobModulePath, process.argv); | ||
mod.on('exit', forkBlobModule); | ||
})(); | ||
(function forkQueueModule(code, signal) { | ||
const mod = fork(env.queueModulePath, process.argv); | ||
mod.on('exit', forkQueueModule); | ||
})(); | ||
(function forkTableModule(code, signal) { | ||
const mod = fork(env.tableModulePath, process.argv); | ||
mod.on('exit', forkTableModule); | ||
})(); | ||
// Forking individual modules to spread them across different cores if possible | ||
// and restarting them automatically in case of a crash. | ||
const fork = require("child_process").fork; | ||
|
||
(function forkBlobModule(code, signal) { | ||
const mod = fork(env.blobModulePath, process.argv); | ||
mod.on("exit", forkBlobModule); | ||
})(); | ||
(function forkQueueModule(code, signal) { | ||
const mod = fork(env.queueModulePath, process.argv); | ||
mod.on("exit", forkQueueModule); | ||
})(); | ||
(function forkTableModule(code, signal) { | ||
const mod = fork(env.tableModulePath, process.argv); | ||
mod.on("exit", forkTableModule); | ||
})(); | ||
}); | ||
}).catch(e => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
}) | ||
.catch((e) => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
|
||
// If this is a child process (e.g. forked by NPM through '$ npm start') we are propagating the signals from the | ||
// If this is a child process (e.g. forked by NPM through '$ npm start') we are propagating the signals from the | ||
// parent (i.e. NPM) to exit from this process and its child processes. | ||
process.on('SIGINT', () => { // e.g. STRG+C | ||
process.exitCode = 1; | ||
process.exit(); | ||
process.on("SIGINT", () => { | ||
// e.g. STRG+C | ||
process.exitCode = 1; | ||
process.exit(); | ||
}); | ||
|
||
process.on('SIGTERM', () => { // e.g. end process from taskmanager | ||
process.exitCode = 1; | ||
process.exit(); | ||
}); | ||
process.on("SIGTERM", () => { | ||
// e.g. end process from taskmanager | ||
process.exitCode = 1; | ||
process.exit(); | ||
}); |
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,23 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
"use strict"; | ||
|
||
const BbPromise = require('bluebird'); | ||
const BbPromise = require("bluebird"); | ||
|
||
process.on('unhandledRejection', (e) => { | ||
console.error('**PANIC** Something unexpected happened! Blob Storage Emulator may be in an inconsistent state!'); | ||
console.error(e); | ||
process.on("unhandledRejection", (e) => { | ||
console.error( | ||
"**PANIC** Something unexpected happened! Blob Storage Emulator may be in an inconsistent state!" | ||
); | ||
console.error(e); | ||
}); | ||
process.noDeprecation = true; | ||
|
||
(() => BbPromise.resolve().then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require('minimist')(process.argv.slice(2)); | ||
const A = require('../lib/AzuriteBlob'), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}).catch(e => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
(() => | ||
BbPromise.resolve() | ||
.then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require("minimist")(process.argv.slice(2)); | ||
const A = require("../lib/AzuriteBlob"), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}) | ||
.catch((e) => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); |
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,23 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
"use strict"; | ||
|
||
const BbPromise = require('bluebird'); | ||
const BbPromise = require("bluebird"); | ||
|
||
process.on('unhandledRejection', (e) => { | ||
console.error('**PANIC** Something unexpected happened! Queue Storage Emulator may be in an inconsistent state!'); | ||
console.error(e); | ||
process.on("unhandledRejection", (e) => { | ||
console.error( | ||
"**PANIC** Something unexpected happened! Queue Storage Emulator may be in an inconsistent state!" | ||
); | ||
console.error(e); | ||
}); | ||
process.noDeprecation = true; | ||
|
||
(() => BbPromise.resolve().then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require('minimist')(process.argv.slice(2)); | ||
const A = require('../lib/AzuriteQueue'), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}).catch(e => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); | ||
(() => | ||
BbPromise.resolve() | ||
.then(() => { | ||
// requiring here so that if anything went wrong, | ||
// during require, it will be caught. | ||
const argv = require("minimist")(process.argv.slice(2)); | ||
const A = require("../lib/AzuriteQueue"), | ||
azurite = new A(); | ||
azurite.init(argv); | ||
}) | ||
.catch((e) => { | ||
process.exitCode = 1; | ||
console.error(e); | ||
}))(); |
Oops, something went wrong.