Beispiel #1
0
        protected override void TestInitialize()
        {
            base.TestInitialize();

            testConfig    = new ServerFailoverTestConfig(BaseTestSite);
            sutController = BaseTestSite.GetAdapter <ISutControlAdapter>();
        }
Beispiel #2
0
        protected override void TestInitialize()
        {
            base.TestInitialize();
            this.testConfig    = new TestConfig();
            this.sutController = BaseTestSite.GetAdapter <ISutControlAdapter>();

            if (this.testConfig.LocalRealm.KDC[0].IsWindows && this.testConfig.TrustType != TrustType.NoTrust)
            {
                //set forest trust authentication as forest-wide authentication
                this.sutController.setSelectiveAuth(this.testConfig.LocalRealm.RealmName, this.testConfig.LocalRealm.Admin.Username, this.testConfig.LocalRealm.Admin.Password, this.testConfig.TrustedRealm.RealmName, false);
            }
            if (this.testConfig.TrustedRealm.KDC[0].IsWindows && this.testConfig.TrustType != TrustType.NoTrust)
            {
                //set forest trust authentication as forest-wide authentication
                this.sutController.setSelectiveAuth(this.testConfig.TrustedRealm.RealmName, this.testConfig.TrustedRealm.Admin.Username, this.testConfig.TrustedRealm.Admin.Password, this.testConfig.LocalRealm.RealmName, false);
            }

            // create KKDCP Client Config according to config file
            if (this.testConfig.UseProxy && proxyClientConfig == null)
            {
                X509Certificate2 clientCert = null;
                if (!string.IsNullOrEmpty(this.testConfig.KKDCPClientCertPath))
                {
                    Assert.IsFalse(!string.IsNullOrEmpty(this.testConfig.KKDCPClientCertPassword), "The protected password should be set.");
                    clientCert = new X509Certificate2();
                    try
                    {
                        clientCert.Import(this.testConfig.KKDCPClientCertPath, this.testConfig.KKDCPClientCertPassword, X509KeyStorageFlags.DefaultKeySet);
                    }
                    catch
                    {
                        BaseTestSite.Log.Add(LogEntryKind.TestError, "Error in importing client certificate.");
                        throw;
                    }
                }
                proxyClientConfig = new KKDCPClientConfig()
                {
                    KKDCPServerURL       = this.testConfig.KKDCPServerUrl,
                    TlsClientCertificate = clientCert
                };
            }

            IClientControlAdapter adapter = BaseTestSite.GetAdapter <IClientControlAdapter>();

            adapter.RestoreSupportedEncryptionTypes();
            adapter.EnableCompoundIdentity();
        }
        protected override void TestInitialize()
        {
            //Initialize all adapters
            base.TestInitialize();
            this.TestConfig    = new AzodTestConfig(this.TestSite);
            this.sutController = BaseTestSite.GetAdapter <ISutControlAdapter>();

            maAdapter = BaseTestSite.GetAdapter <IMessageAnalyzerAdapter>();
            maAdapter.Reset();

            // Capture files location on the driver computer
            if (!Directory.Exists(TestConfig.LocalCapFilePath))
            {
                Directory.CreateDirectory(TestConfig.LocalCapFilePath);
            }
            // Logs Path for Powershell Adapter on the driver computer.
            if (!Directory.Exists(TestConfig.DriverLogPath))
            {
                Directory.CreateDirectory(TestConfig.DriverLogPath);
            }
            //other initialization setting if needed
        }
        protected override void TestInitialize()
        {
            base.TestInitialize();

            testConfig = new ServerFailoverTestConfig(BaseTestSite);
            sutController = BaseTestSite.GetAdapter<ISutControlAdapter>();
        }