public async Task ADLSWriteClientIdLargeFileContentsNoEmptyFileLeft() { AdlsTestHelper.CheckADLSEnvironment(); string filename = "largefilecheck_CSharp.txt"; string writeContents = new string('A', 100000000); ADLSAdapter adapter = AdlsTestHelper.CreateAdapterWithClientId(); adapter.Ctx = new ResolveContext(null, null); adapter.Ctx.FeatureFlags.Add("ADLSAdapter_deleteEmptyFile", true); try { await adapter.WriteAsync(filename, writeContents); } catch (Exception e) { } try { await adapter.ReadAsync(filename); } catch (Exception e) { Assert.IsTrue(e.Message.Contains("The specified path does not exist")); } }
private CdmCorpusDefinition SetupCdmCorpus() { // ------------------------------------------------------------------------------------------------------------ // Instantiate corpus and set up the default namespace to be local var cdmCorpus = new CdmCorpusDefinition(); cdmCorpus.Storage.DefaultNamespace = "local"; // ------------------------------------------------------------------------------------------------------------ // Set up adapters for managing access to different files-system locations c // Fake cdm, normaly use the CDM Standards adapter // Mount it as the 'cdm' device, not the default so must use "cdm:/folder" to get there cdmCorpus.Storage.Mount("cdm", new LocalAdapter(TestHelper.SampleSchemaFolderPath)); cdmCorpus.Storage.Mount( "local", new LocalAdapter(AdlsModelJsonTestHelper.GetActualSubFolderPath(testsSubpath, nameof(TestReadLocalSaveAdls), AdlsModelJsonTestHelper.inputFolderName)) ); // Example how to mount to the ADLS - make sure the hostname and root entered here are also changed // in the example.model.json file we load in the next section cdmCorpus.Storage.Mount( "adls", AdlsTestHelper.CreateAdapterWithClientId(rootRelativePath) ); return(cdmCorpus); }
public async Task ADLSWriteClientIdEmptyContentsNoEmptyFileLeft() { AdlsTestHelper.CheckADLSEnvironment(); string filename = "emptycheck_CSharp.txt"; string writeContents = ""; ADLSAdapter adapter = AdlsTestHelper.CreateAdapterWithClientId(); try { await adapter.WriteAsync(filename, writeContents); } catch (Exception e) {} try { await adapter.ReadAsync(filename); } catch (Exception e) { Assert.IsTrue(e.Message.Contains("The specified path does not exist")); } }
public async Task ADLSSpecialCharactersTest() { AdlsTestHelper.CheckADLSEnvironment(); await RunSpecialCharactersTest(AdlsTestHelper.CreateAdapterWithClientId("PathWithSpecialCharactersAndUnescapedStringTest/Root-With=Special Characters:")); }
public async Task ADLSFileEnumClientId() { AdlsTestHelper.CheckADLSEnvironment(); await RunFileEnumTest(AdlsTestHelper.CreateAdapterWithClientId()); }
public async Task ADLSCheckFileTimeClientId() { AdlsTestHelper.CheckADLSEnvironment(); await RunCheckFileTimeTest(AdlsTestHelper.CreateAdapterWithClientId()); }
public async Task ADLSWriteReadWithBlobHostName() { AdlsTestHelper.CheckADLSEnvironment(); await RunWriteReadTest(AdlsTestHelper.CreateAdapterWithSharedKey(testBlobHostName: true)); await RunWriteReadTest(AdlsTestHelper.CreateAdapterWithClientId(testBlobHostName: true)); }
public async Task ADLSWriteReadClientIdWithEndpoint() { AdlsTestHelper.CheckADLSEnvironment(); await RunWriteReadTest(AdlsTestHelper.CreateAdapterWithClientId(specifyEndpoint: true)); }
public async Task ADLSWriteReadClientId() { AdlsTestHelper.CheckADLSEnvironment(); await RunWriteReadTest(AdlsTestHelper.CreateAdapterWithClientId()); }