public LeakyAzureBlobStorageTest() { ITestSettings settings = Settings.Instance; _storage = StorageFactory.Blobs.AzureBlobStorage(settings.AzureStorageName, settings.AzureStorageKey); _native = (IAzureBlobStorage)_storage; }
public DocumentationScenarios() { _settings = new ConfigurationBuilder <ITestSettings>() .UseIniFile("c:\\tmp\\integration-tests.ini") .UseEnvironmentVariables() .Build(); }
protected override IBlobStorage CreateStorage(ITestSettings settings) { return(StorageFactory.Blobs.GoogleCloudStorageFromJson( settings.GcpStorageBucketName, settings.GcpStorageJsonCreds, true)); }
protected override IMessageReceiver CreateReceiver(ITestSettings settings) => StorageFactory.Messages.AzureStorageQueueReceiver( settings.AzureStorageName, settings.AzureStorageKey, settings.AzureStorageQueueName, TimeSpan.FromMinutes(1), TimeSpan.FromMilliseconds(500));
protected override IMessageReceiver CreateReceiver(ITestSettings settings) => StorageFactory.Messages.AmazonSQSMessageReceiver( settings.AwsAccessKeyId, settings.AwsSecretAccessKey, "https://sqs.us-east-1.amazonaws.com", "integration", RegionEndpoint.USEast1);
public void CompileKitchenSinkForAttach(ITestSettings settings) { this.TestPurpose("Compiles the kitchen sink debuggee for attach."); this.WriteSettings(settings); IDebuggee debuggee = SinkHelper.OpenAndCompile(this, settings.CompilerSettings, DebuggeeMonikers.KitchenSink.Attach); }
public void BreakpointSettingsVerification(ITestSettings settings) { this.TestPurpose("Tests supported breakpoint settings"); this.WriteSettings(settings); IDebuggee debuggee = SinkHelper.Open(this, settings.CompilerSettings, DebuggeeMonikers.KitchenSink.Breakpoint); using (IDebuggerRunner runner = CreateDebugAdapterRunner(settings)) { this.Comment("Configure launch"); runner.Launch(settings.DebuggerSettings, debuggee); Assert.True(runner.InitializeResponse.body.supportsConditionalBreakpoints.HasValue && runner.InitializeResponse.body.supportsConditionalBreakpoints.Value == true, "Conditional breakpoints should be supported"); Assert.True(runner.InitializeResponse.body.supportsFunctionBreakpoints.HasValue && runner.InitializeResponse.body.supportsFunctionBreakpoints.Value == true, "Function breakpoints should be supported"); this.Comment("Run to completion"); runner.Expects.ExitedEvent() .TerminatedEvent() .AfterConfigurationDone(); runner.DisconnectAndVerify(); } }
protected override IBlobStorage CreateStorage(ITestSettings settings) { return(StorageFactory.Blobs.AmazonS3BlobStorage( settings.AwsAccessKeyId, settings.AwsSecretAccessKey, settings.AwsTestBucketName)); }
protected KeyValueStorageTest(string name) { _settings = new ConfigurationBuilder <ITestSettings>() .UseIniFile("c:\\tmp\\integration-tests.ini") .UseEnvironmentVariables() .Build(); _name = name; if (_name == "csv-files") { _tables = StorageFactory.KeyValue.CsvFiles(TestDir); } else if (_name == "azure") { _tables = StorageFactory.KeyValue.AzureTableStorage( _settings.AzureStorageName, _settings.AzureStorageKey); } else if (_name == "azure-emulator") { _tables = StorageFactory.KeyValue.AzureTableDevelopmentStorage(); } _tableName = "TableStorageTest" + Guid.NewGuid().ToString().Replace("-", ""); }
public BlobStorageProviderTest(string type) { _settings = new ConfigurationBuilder <ITestSettings>() .UseIniFile("c:\\tmp\\integration-tests.ini") .UseEnvironmentVariables() .Build(); _type = type; switch (_type) { case "azure": _provider = new AzureBlobStorageProvider( _settings.AzureStorageName, _settings.AzureStorageKey, "blobstoragetest"); break; case "azure-sas": _provider = StorageFactory.Blobs.AzureBlobStorageByContainerSasUri(_settings.AzureContainerSasUri); break; case "azure-datalakestore": //Console.WriteLine("ac: {0}, tid: {1}, pid: {2}, ps: {3}", _settings.AzureDataLakeStoreAccountName, _settings.AzureDataLakeTenantId, _settings.AzureDataLakePrincipalId, _settings.AzureDataLakePrincipalSecret); _provider = StorageFactory.Blobs.AzureDataLakeStoreByClientSecret( _settings.AzureDataLakeStoreAccountName, _settings.AzureDataLakeTenantId, _settings.AzureDataLakePrincipalId, _settings.AzureDataLakePrincipalSecret); break; case "disk-directory": _provider = StorageFactory.Blobs.DirectoryFiles(TestDir); break; case "zip": _provider = StorageFactory.Blobs.ZipFile(Path.Combine(TestDir.FullName, "test.zip")); break; case "aws-s3": _provider = new AwsS3BlobStorageProvider( _settings.AwsAccessKeyId, _settings.AwsSecretAccessKey, _settings.AwsTestBucketName); break; case "inmemory": _provider = StorageFactory.Blobs.InMemory(); break; case "azurekeyvault": _provider = StorageFactory.Blobs.AzureKeyVault( _settings.KeyVaultUri, _settings.KeyVaultCreds); break; } _bs = new BlobStorage(_provider); }
public void CompileKitchenSinkForExpressionTests(ITestSettings settings) { this.TestPurpose("Compile kitchen sink debuggee for expression tests."); this.WriteSettings(settings); IDebuggee debuggee = SinkHelper.OpenAndCompile(this, settings.CompilerSettings, DebuggeeMonikers.KitchenSink.Expression); }
public void CompileSourceMapForSourceMapping(ITestSettings settings) { this.TestPurpose("Compiles source map debuggee for source mapping."); this.WriteSettings(settings); IDebuggee debuggee = SourceMappingHelper.OpenAndCompile(this, settings.CompilerSettings, DebuggeeMonikers.SourceMapping.Default); }
public void CompileKitchenSinkForBreakpointTests(ITestSettings settings) { this.TestPurpose("Compiles the kitchen sink debuggee."); this.WriteSettings(settings); IDebuggee debuggee = SinkHelper.OpenAndCompile(this, settings.CompilerSettings, DebuggeeMonikers.KitchenSink.Breakpoint); }
public void EvaluateInvalidExpression(ITestSettings settings) { this.TestPurpose("To test invalid expression evaluation return apropriate errors."); this.WriteSettings(settings); IDebuggee debuggee = SinkHelper.Open(this, settings.CompilerSettings, DebuggeeMonikers.KitchenSink.Expression); using (IDebuggerRunner runner = CreateDebugAdapterRunner(settings)) { this.Comment("Configure launch."); runner.Launch(settings.DebuggerSettings, debuggee, "-fExpression"); this.Comment("Set a breakpoint so that we can stop at a line."); runner.SetBreakpoints(debuggee.Breakpoints(SinkHelper.Expression, 31)); this.Comment("To start debugging and hit breakpoint."); runner.Expects.HitBreakpointEvent().AfterConfigurationDone(); using (IThreadInspector threadInspector = runner.GetThreadInspector()) { IFrameInspector currentFrame = threadInspector.Stack.First(); this.Comment("To evaluate some invalid expression on curren stack frame."); currentFrame.AssertEvaluateAsError("notExistVar", EvaluateContext.Watch); } this.Comment("Continue to run to exist."); runner.Expects.TerminatedEvent().AfterContinue(); runner.DisconnectAndVerify(); } }
public LeakyAmazonS3StorageTest() { _settings = Settings.Instance; _storage = (IAwsS3BlobStorage)StorageFactory.Blobs.AwsS3( _settings.AwsAccessKeyId, _settings.AwsSecretAccessKey, null, _settings.AwsTestBucketName, _settings.AwsTestBucketRegion); }
/// <summary> /// Compile the shared library /// </summary> private void CompileSharedLib(ITestSettings settings, int debuggeeMoniker) { IDebuggee debuggee = Debuggee.Create(this, settings.CompilerSettings, debuggeeName, debuggeeMoniker, outLibName, CompilerOutputType.SharedLibrary); debuggee.AddSourceFiles(srcLibName); debuggee.Compile(); }
protected TableStorageTest(string name) { _settings = new ConfigurationBuilder <ITestSettings>() .UseIniFile("c:\\tmp\\integration-tests.ini") .UseEnvironmentVariables() .Build(); _name = name; if (_name == "csv-files") { _tables = StorageFactory.Tables.CsvFiles(TestDir); } else if (_name == "azure") { _tables = StorageFactory.Tables.AzureTableStorage( _settings.AzureStorageName, _settings.AzureStorageKey); } else if (_name == "mssql") { _tables = StorageFactory.Tables.MssqlServer( _settings.MssqlConnectionString); } /*else if(_name == "esent") * { * _tables = StorageFactory.Tables.Esent( * Path.Combine(TestDir.FullName, "test.edb")); * }*/ _tableName = "TableStorageTest" + Guid.NewGuid().ToString().Replace("-", ""); //_tableName = "TableStorageTest"; }
public void CallStackBasic(ITestSettings settings) { this.TestPurpose("To check all frames of callstack on a thead and evaluation on each frame."); this.WriteSettings(settings); IDebuggee debuggee = SinkHelper.Open(this, settings.CompilerSettings, DebuggeeMonikers.KitchenSink.Expression); this.Comment("Here are stack frames in a list we expect the actual to match with this."); StackFrame[] expectedstackFrames = ExpressionTests.GenerateFramesList(settings.DebuggerSettings); using (IDebuggerRunner runner = CreateDebugAdapterRunner(settings)) { this.Comment("Configure launch."); runner.Launch(settings.DebuggerSettings, debuggee, "-fExpression"); this.Comment("Set a breakpoint so that we can stop after starting debugging."); runner.SetBreakpoints(debuggee.Breakpoints(SinkHelper.Expression, 19)); this.Comment("To start debugging and break"); runner.Expects.StoppedEvent(StoppedReason.Breakpoint, SinkHelper.Expression, 19).AfterConfigurationDone(); this.Comment("To step in several times into the innermost layer of a recursive call."); runner.ExpectStepAndStepToTarget(SinkHelper.Expression, 9, 10).AfterStepIn(); runner.Expects.HitStepEvent(SinkHelper.Expression, 12).AfterStepIn(); runner.ExpectStepAndStepToTarget(SinkHelper.Expression, 9, 10).AfterStepIn(); runner.Expects.HitStepEvent(SinkHelper.Expression, 12).AfterStepIn(); runner.ExpectStepAndStepToTarget(SinkHelper.Expression, 9, 10).AfterStepIn(); using (IThreadInspector threadInspector = runner.GetThreadInspector()) { IEnumerable <IFrameInspector> stackOfCurrentThread = threadInspector.Stack; this.Comment("To verify the count of stack frames count."); Assert.True(stackOfCurrentThread.Count() >= 13, "Expected the stack frame count to be at least 13 deep"); this.Comment("To verify each frame, include frame name, line number and source name."); int index = 0; foreach (IFrameInspector frame in stackOfCurrentThread) { if (index >= 13) { break; } StackFrame expectedstackFrame = expectedstackFrames[index]; this.Comment("Comparing Names. Expecected: {0}, Actual: {1}", expectedstackFrame.Name, frame.Name); Assert.Contains(expectedstackFrame.Name, frame.Name, StringComparison.Ordinal); this.Comment("Comparing line number. Expecected: {0}, Actual: {1}", expectedstackFrame.Line, frame.Line); Assert.Equal(expectedstackFrame.Line, frame.Line); this.Comment("Comparing Source Name. Expecected: {0}, Actual: {1}", expectedstackFrame.SourceName, frame.SourceName); Assert.Equal(expectedstackFrame.SourceName, frame.SourceName); index++; } } this.Comment("Continue to run to exist."); runner.Expects.TerminatedEvent().AfterContinue(); runner.DisconnectAndVerify(); } }
public void CompileExceptionDebuggee(ITestSettings settings) { this.TestPurpose("Create and compile the 'exception' debuggee"); this.WriteSettings(settings); this.Comment("Compile the application"); CompileApp(this, settings, DebuggeeMonikers.Exception.Default); }
protected override IBlobStorage CreateStorage(ITestSettings settings) { return(StorageFactory.Blobs.AzureDataLakeStorageWithSharedKey( settings.AzureDataLakeGen2Name, settings.AzureDataLakeGen2Key)); //return StorageFactory.Blobs.AzureDataLakeGen2StoreBySharedAccessKey(settings.AzureDataLakeGen2Name, settings.AzureDataLakeGen2Key); }
protected override IMessenger CreateMessenger(ITestSettings settings) { return(StorageFactory.Messages.AwsSQS( settings.AwsAccessKeyId, settings.AwsSecretAccessKey, "https://sqs.us-east-1.amazonaws.com", RegionEndpoint.USEast1)); }
public LeakyAdlsGen2StorageTest() { _settings = Settings.Instance; _storage = StorageFactory.Blobs.AzureDataLakeGen2StoreBySharedAccessKey( _settings.AzureDataLakeGen2Name, _settings.AzureDataLakeGen2Key); }
protected override IBlobStorage CreateStorage(ITestSettings settings) { return(StorageFactory.Blobs.AzureKeyVault( settings.KeyVaultUri, settings.KeyVaultTenantId, settings.KeyVaultClientId, settings.KeyVaultSecret)); }
protected override IBlobStorage CreateStorage(ITestSettings settings) { return(StorageFactory.Blobs.AzureDataLakeGen1StoreByClientSecret( settings.AzureGen1StorageName, settings.TenantId, settings.ClientId, settings.ClientSecret)); }
protected override IBlobStorage CreateStorage(ITestSettings settings) { IVirtualStorage vs = StorageFactory.Blobs.Virtual(); vs.Mount("/", StorageFactory.Blobs.InMemory()); vs.Mount("/mnt/s0", StorageFactory.Blobs.InMemory()); return(vs); }
public void MergeSettings(ITestSettings settings) { ExtensionDirectories.Add(settings.ExtensionsDirectory); if (settings.DebugMixedMode) { DebugMixedMode = true; } }
public void SharedLibBasic(ITestSettings settings) { this.TestPurpose("This test checks to see if basic debugging scenarios work for application invoked shared library."); this.WriteSettings(settings); this.Comment("Start running targeted scenarios"); RunTargetedScenarios(settings, outAppName, DebuggeeMonikers.SharedLib.Default); }
protected override IBlobStorage CreateStorage(ITestSettings settings) { return(StorageFactory.Blobs.AzureDataLakeGen1StoreByClientSecret( settings.AzureDataLakeStoreAccountName, settings.AzureDataLakeTenantId, settings.AzureDataLakePrincipalId, settings.AzureDataLakePrincipalSecret)); }
public LeakyAdlsGen2StorageTest() { _settings = Settings.Instance; _storage = StorageFactory.Blobs.AzureDataLakeStorageWithAzureAd( _settings.AzureDataLakeGen2Name, _settings.AzureDataLakeGen2TenantId, _settings.AzureDataLakeGen2PrincipalId, _settings.AzureDataLakeGen2PrincipalSecret); }
protected override IBlobStorage CreateStorage(ITestSettings settings) { return(StorageFactory.Blobs.AwsS3( settings.AwsAccessKeyId, settings.AwsSecretAccessKey, null, settings.AwsTestBucketName, settings.AwsTestBucketRegion)); }