Exemplo n.º 1
0
        public void AzureMsalUserAuthTest()
        {
            TestUtilities utils = DefaultUtilities();

            utils.ConfigurationOptions.AzureClientId              = null;
            utils.ConfigurationOptions.AzureClientSecret          = null;
            utils.ConfigurationOptions.AzureResourceGroup         = null;
            utils.ConfigurationOptions.AzureResourceGroupLocation = null;
            utils.ConfigurationOptions.AzureSubscriptionId        = null;
            utils.ConfigurationOptions.AzureTenantId              = null;

            ProcessOutput results = utils.ExecuteTest();

            /* known cng error in .net core that test is running as and azure-az modules
             * fix is to use cert thumb as secret but cert may have to be real / from ca
             */
            Assert.IsFalse(results.HasErrors(), results.ToString());

            /*
             *  "StandardError": "13:Validate:exception: validate:exception:System.AggregateException: One or more errors occurred. (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)\r\n ---> System.TypeLoadException: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.\r\n   at Microsoft.Identity.Client.Platforms.net45.NetDesktopCryptographyManager.CreateSha256HashBytes(
             */
        }
Exemplo n.º 2
0
        public ProcessOutput StopConsoleRedirection()
        {
            Log.Info("stopping redirection");
            // give time for logging to finish
            Thread.Sleep(1000);
            Log.Close();
            FlushConsoleOutput();
            ProcessOutput output = new ProcessOutput
            {
                StandardError  = ConsoleErr.ToString(),
                StandardOutput = ConsoleOut.ToString()
            };

            ConsoleErr = new StringWriter();
            ConsoleOut = new StringWriter();

            Console.SetOut(Console.Out);
            Console.SetError(Console.Error);

            consoleOutBuilder.Append(output.StandardOutput);
            consoleErrBuilder.Append(output.StandardError);

            return(output);
        }