Beispiel #1
0
        private static void CreateDockerContainer()
        {
            // 建立測試用測試資料庫的 container

            DockerSupport.CreateContainer(ContainerType, out var databaseIp, out var containerId);

            DatabaseIp  = databaseIp;
            ContainerId = containerId;

            // 於 container 裡的 sql-server 建立測試用的 database
            var connectionString = string.Format(TestDbConnection.Container.Master, DatabaseIp);

            DatabaseCommand.CreateDatabase(connectionString, DatabaseName.SampleDB);

            SampleDbConnection = string.Format(TestDbConnection.Container.Database, DatabaseIp, DatabaseName.SampleDB);
        }