1 /*
2  *  Make.org Core API
3  *  Copyright (C) 2020 Make.org
4  *
5  * This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Affero General Public License as
7  *  published by the Free Software Foundation, either version 3 of the
8  *  License, or (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Affero General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Affero General Public License
16  *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  *
18  */
19 
20 package org.make.api.docker
21 import com.github.dockerjava.core.{DefaultDockerClientConfig, DockerClientConfig}
22 import com.github.dockerjava.netty.NettyDockerCmdExecFactory
23 import com.whisk.docker.DockerFactory
24 import com.whisk.docker.impl.dockerjava.{Docker, DockerJavaExecutorFactory}
25 import com.whisk.docker.scalatest.DockerTestKit
26 import org.scalatest.Suite
27 
28 import scala.concurrent.duration.DurationInt
29 
30 trait DockerBaseTest extends DockerTestKit {
31   self: Suite =>
32 
33   private val dockerClientConfig: DockerClientConfig = DefaultDockerClientConfig.createDefaultConfigBuilder().build()
34   private val client: Docker = new Docker(dockerClientConfig, new NettyDockerCmdExecFactory())
35   override implicit val dockerFactory: DockerFactory = new DockerJavaExecutorFactory(client)
36   override val StartContainersTimeout = 1.minute
37 
38 }
Line Stmt Id Pos Tree Symbol Tests Code
33 22059 1270 - 1332 Apply com.github.dockerjava.core.DefaultDockerClientConfig.Builder.build org.make.api.docker.dockerbasetest com.github.dockerjava.core.DefaultDockerClientConfig.createDefaultConfigBuilder().build()
34 22135 1395 - 1426 Apply com.github.dockerjava.netty.NettyDockerCmdExecFactory.<init> org.make.api.docker.dockerbasetest new com.github.dockerjava.netty.NettyDockerCmdExecFactory()
34 22030 1364 - 1427 Apply com.whisk.docker.impl.dockerjava.Docker.<init> org.make.api.docker.dockerbasetest new com.whisk.docker.impl.dockerjava.Docker(DockerBaseTest.this.dockerClientConfig, new com.github.dockerjava.netty.NettyDockerCmdExecFactory())
34 22227 1375 - 1393 Select org.make.api.docker.DockerBaseTest.dockerClientConfig org.make.api.docker.dockerbasetest DockerBaseTest.this.dockerClientConfig
35 22141 1483 - 1520 Apply com.whisk.docker.impl.dockerjava.DockerJavaExecutorFactory.<init> org.make.api.docker.dockerbasetest new com.whisk.docker.impl.dockerjava.DockerJavaExecutorFactory(DockerBaseTest.this.client)
35 22197 1513 - 1519 Select org.make.api.docker.DockerBaseTest.client org.make.api.docker.dockerbasetest DockerBaseTest.this.client
36 22207 1561 - 1569 Select scala.concurrent.duration.DurationConversions.minute org.make.api.docker.dockerbasetest scala.concurrent.duration.`package`.DurationInt(1).minute
36 22053 1561 - 1562 Literal <nosymbol> org.make.api.docker.dockerbasetest 1