Ejemplo n.º 1
0
        /// <summary>
        /// Setsup the super client and returns
        /// </summary>
        /// <returns></returns>
        private static AdlsClient SetupSuperClient()
        {
            string clientId                      = SdkUnitTest.ReadSetting("AccountOwnerClientId");
            string clientSecret                  = SdkUnitTest.ReadSetting("AccountOwnerClientSecret");
            string domain                        = SdkUnitTest.ReadSetting("Domain");
            string clientAccountPath             = SdkUnitTest.ReadSetting("Account");
            var    creds                         = new ClientCredential(clientId, clientSecret);
            ServiceClientCredentials clientCreds = ApplicationTokenProvider.LoginSilentAsync(domain, creds).GetAwaiter().GetResult();

            return(AdlsClient.CreateClient(clientAccountPath, clientCreds));
        }
Ejemplo n.º 2
0
        public static void SetupClient(TestContext context)
        {
            _nonOwner1ObjectId = SdkUnitTest.ReadSetting("NonOwner1ObjectId");
            _nonOwner2ObjectId = SdkUnitTest.ReadSetting("NonOwner2ObjectId");
            _group1Id          = SdkUnitTest.ReadSetting("Group1Id");
            _adlsClient        = SetupSuperClient();

            _adlsClient.DeleteRecursive("/Test2");
            _oneLevelDirCount = 3;
            _oneLevelFileCnt  = 2;
            _recurseLevel     = 3;
            _oneFileSize      = 100;

            DataCreator.CreateDirRecursiveRemote(_adlsClient, remotePath, _recurseLevel, _oneLevelDirCount, _oneLevelFileCnt, _oneLevelFileCnt, _oneFileSize, _oneFileSize);
        }