Exemplo n.º 1
0
        protected static void GlobalSetup()
        {
            ShouldlyConfiguration.DefaultTaskTimeout = TimeSpan.FromMinutes(1);

            (String, String, String)dockerCredentials = ("https://www.docker.com", "stuartferguson", "Sc0tland");

            // Setup a network for the DB Server
            Setup.DatabaseServerNetwork = DockerHelper.SetupTestNetwork("sharednetwork");

            NlogLogger logger = new NlogLogger();

            logger.Initialise(LogManager.GetLogger("Specflow"), "Specflow");
            LogManager.AddHiddenAssembly(typeof(NlogLogger).Assembly);

            String sqlServerImageName           = "mcr.microsoft.com/mssql/server:2019-latest";
            DockerEnginePlatform enginePlatform = DockerHelper.GetDockerEnginePlatform();

            if (enginePlatform == DockerEnginePlatform.Windows)
            {
                sqlServerImageName = "tobiasfenster/mssql-server-dev-unsupported:2019-cu13";
            }

            // Start the Database Server here
            Setup.DatabaseServerContainer = Setup.StartSqlContainerWithOpenConnection(Setup.SqlServerContainerName,
                                                                                      logger,
                                                                                      sqlServerImageName,
                                                                                      Setup.DatabaseServerNetwork,
                                                                                      dockerCredentials,
                                                                                      Setup.SqlUserName,
                                                                                      Setup.SqlPassword);
        }
Exemplo n.º 2
0
        public async Task StartSystem()
        {
            String     scenarioName = this.ScenarioContext.ScenarioInfo.Title.Replace(" ", "");
            NlogLogger logger       = new NlogLogger();

            logger.Initialise(LogManager.GetLogger(scenarioName), scenarioName);
            LogManager.AddHiddenAssembly(typeof(NlogLogger).Assembly);

            this.TestingContext.DockerHelper = new DockerHelper(logger);
            await this.TestingContext.DockerHelper.StartContainersForScenarioRun(scenarioName).ConfigureAwait(false);
        }
        public async Task StartSystem()
        {
            // Initialise a logger
            String     scenarioName = this.ScenarioContext.ScenarioInfo.Title.Replace(" ", "");
            NlogLogger logger       = new NlogLogger();

            logger.Initialise(LogManager.GetLogger(scenarioName), scenarioName);
            LogManager.AddHiddenAssembly(typeof(NlogLogger).Assembly);

            this.TestingContext.DockerHelper = new DockerHelper(logger, this.TestingContext);
            this.TestingContext.Logger       = logger;
            this.TestingContext.Logger.LogInformation("About to Start Containers for Scenario Run");
            await this.TestingContext.DockerHelper.StartContainersForScenarioRun(scenarioName).ConfigureAwait(false);

            this.TestingContext.Logger.LogInformation("Containers for Scenario Run Started");

            Thread.Sleep(20000);
        }
Exemplo n.º 4
0
        protected static void GlobalSetup()
        {
            ShouldlyConfiguration.DefaultTaskTimeout = TimeSpan.FromMinutes(1);

            (String, String, String) dockerCredentials = ("https://www.docker.com", "stuartferguson", "Sc0tland");

            // Setup a network for the DB Server
            Setup.DatabaseServerNetwork = global::Shared.IntegrationTesting.DockerHelper.SetupTestNetwork("sharednetwork", true);

            NlogLogger logger = new NlogLogger();
            logger.Initialise(LogManager.GetLogger("Specflow"), "Specflow");
            LogManager.AddHiddenAssembly(typeof(NlogLogger).Assembly);

            // Start the Database Server here
            Setup.DatabaseServerContainer = global::Shared.IntegrationTesting.DockerHelper.StartSqlContainerWithOpenConnection(Setup.SqlServerContainerName,
                                                                                       logger,
                                                                                       "mcr.microsoft.com/mssql/server:2019-latest",
                                                                                       Setup.DatabaseServerNetwork,
                                                                                       "",
                                                                                       dockerCredentials,
                                                                                       Setup.SqlUserName,
                                                                                       Setup.SqlPassword);
        }