//Check that create a VDB call will return a response.
        public void ProvisionVdbTest()
        {
            // Create and valiate a session
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
            // Trust all certificates
            System.Net.ServicePointManager.ServerCertificateValidationCallback =
                ((sender, certificate, chain, sslPolicyErrors) => true);

            // Get a cookie + Authenticate
            Session.CreateSession(System.Environment.GetEnvironmentVariable("DELPHIX_USER"), System.Environment.GetEnvironmentVariable("DELPHIX_PASSWORD"), System.Environment.GetEnvironmentVariable("DELPHIX_URL"));
            string cookie = Session.jSessionId.Value;


            //Create helpers
            GroupService        groupHelper = new GroupService();
            EnvironmentService  delphixEnvironmentHelper = new EnvironmentService();
            SourceConfigService sourceConfigHelper       = new SourceConfigService();
            RepositoryService   repositoryHelper         = new RepositoryService();
            TimeflowService     timeflowHelper           = new TimeflowService();
            SourceService       sourceHelper             = new SourceService();
            DatabaseService     dbHelp = new DatabaseService();

            //Create a test group
            CreateGroupsResponse newGroupRef = groupHelper.CreateGroups("intTestGroup", true);

            if (newGroupRef.result.Equals("Group already exists"))
            {
                Console.WriteLine("A group named intTestGroup already exists.  An attempt to delete the existing one was made, but there are active databases within the group.");
            }

            //Create a target server on Delphix
        }
Example #2
0
        //Check that create a VDB call will return a response.
        public void CreateGroupTest()
        {
            // Create and valiate a session
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
            // Trust all certificates
            System.Net.ServicePointManager.ServerCertificateValidationCallback =
                ((sender, certificate, chain, sslPolicyErrors) => true);

            // Get a cookie + Authenticate
            Session.CreateSession(System.Environment.GetEnvironmentVariable("DELPHIX_USER"), System.Environment.GetEnvironmentVariable("DELPHIX_PASSWORD"), System.Environment.GetEnvironmentVariable("DELPHIX_URL"));
            string cookie = Session.jSessionId.Value;


            //Create helpers
            GroupService groupHelper = new GroupService();


            //Create a test group
            CreateGroupsResponse newGroupRef = groupHelper.CreateGroups("CreateUnit", true);

            if (newGroupRef.Equals("Group already exists"))
            {
                Console.WriteLine("A group named CreateUnit already exists.  An attempt to delete the existing one was made, but there are active databases within the group.");
            }
        }