mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -14,6 +14,7 @@ suite('Telemetry - common properties', function () {
|
||||
|
||||
const commit = void 0;
|
||||
const version = void 0;
|
||||
const source = void 0;
|
||||
let storageService;
|
||||
|
||||
setup(() => {
|
||||
@@ -22,7 +23,7 @@ suite('Telemetry - common properties', function () {
|
||||
|
||||
test('default', function () {
|
||||
|
||||
return resolveWorkbenchCommonProperties(storageService, commit, version).then(props => {
|
||||
return resolveWorkbenchCommonProperties(storageService, commit, version, source).then(props => {
|
||||
|
||||
assert.ok('commitHash' in props);
|
||||
assert.ok('sessionID' in props);
|
||||
@@ -37,6 +38,7 @@ suite('Telemetry - common properties', function () {
|
||||
// assert.ok('common.version.renderer' in first.data);
|
||||
assert.ok('common.osVersion' in props, 'osVersion');
|
||||
assert.ok('version' in props);
|
||||
assert.ok('common.source' in props);
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
assert.ok('common.application.name' in props);
|
||||
@@ -48,10 +50,6 @@ suite('Telemetry - common properties', function () {
|
||||
// machine id et al
|
||||
assert.ok('common.instanceId' in props, 'instanceId');
|
||||
assert.ok('common.machineId' in props, 'machineId');
|
||||
if (process.platform === 'win32') { // SQM only on windows
|
||||
assert.ok('common.sqm.userid' in props, 'userid');
|
||||
assert.ok('common.sqm.machineid' in props, 'machineid');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
@@ -60,7 +58,7 @@ suite('Telemetry - common properties', function () {
|
||||
|
||||
storageService.store('telemetry.lastSessionDate', new Date().toUTCString());
|
||||
|
||||
return resolveWorkbenchCommonProperties(storageService, commit, version).then(props => {
|
||||
return resolveWorkbenchCommonProperties(storageService, commit, version, source).then(props => {
|
||||
|
||||
assert.ok('common.lastSessionDate' in props); // conditional, see below
|
||||
assert.ok('common.isNewSession' in props);
|
||||
@@ -69,7 +67,7 @@ suite('Telemetry - common properties', function () {
|
||||
});
|
||||
|
||||
test('values chance on ask', function () {
|
||||
return resolveWorkbenchCommonProperties(storageService, commit, version).then(props => {
|
||||
return resolveWorkbenchCommonProperties(storageService, commit, version, source).then(props => {
|
||||
let value1 = props['common.sequence'];
|
||||
let value2 = props['common.sequence'];
|
||||
assert.ok(value1 !== value2, 'seq');
|
||||
|
||||
@@ -681,24 +681,25 @@ suite('TelemetryService', () => {
|
||||
enableTelemetry: enableTelemetry
|
||||
} as any;
|
||||
},
|
||||
getConfigurationData(): any {
|
||||
getValue(key) {
|
||||
return getConfigurationValue(this.getConfiguration(), key);
|
||||
},
|
||||
updateValue() {
|
||||
return null;
|
||||
},
|
||||
reloadConfiguration() {
|
||||
return TPromise.as(this.getConfiguration());
|
||||
},
|
||||
lookup(key: string) {
|
||||
inspect(key: string) {
|
||||
return {
|
||||
value: getConfigurationValue(this.getConfiguration(), key),
|
||||
default: getConfigurationValue(this.getConfiguration(), key),
|
||||
user: getConfigurationValue(this.getConfiguration(), key),
|
||||
workspace: null,
|
||||
folder: null
|
||||
workspaceFolder: null
|
||||
};
|
||||
},
|
||||
keys() { return { default: [], user: [], workspace: [], folder: [] }; },
|
||||
values() { return {}; },
|
||||
onDidUpdateConfiguration: emitter.event
|
||||
keys() { return { default: [], user: [], workspace: [], workspaceFolder: [] }; },
|
||||
onDidChangeConfiguration: emitter.event,
|
||||
reloadConfiguration() { return null; },
|
||||
getConfigurationData() { return null; }
|
||||
});
|
||||
|
||||
assert.equal(service.isOptedIn, false);
|
||||
|
||||
Reference in New Issue
Block a user