forked from bsteciuk/kismatic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker_registry_test.go
36 lines (32 loc) · 1.12 KB
/
docker_registry_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package integration
import (
"fmt"
"os"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("kismatic docker registry feature", func() {
BeforeEach(func() {
dir := setupTestWorkingDir()
os.Chdir(dir)
})
Describe("using an existing private docker registry", func() {
ItOnAWS("should install successfully [slow]", func(aws infrastructureProvisioner) {
WithInfrastructure(NodeCount{2, 1, 1, 0, 0}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
By("Installing an external Docker registry on one of the nodes")
dockerRegistryPort := 8443
caFile, err := deployAuthenticatedDockerRegistry(nodes.etcd[1], dockerRegistryPort, sshKey)
Expect(err).ToNot(HaveOccurred())
opts := installOptions{
dockerRegistryCAPath: caFile,
dockerRegistryServer: fmt.Sprintf("%s:%d", nodes.etcd[1].PrivateIP, dockerRegistryPort),
dockerRegistryUsername: "kismaticuser",
dockerRegistryPassword: "kismaticpassword",
}
nodes.etcd = []NodeDeets{nodes.etcd[0]}
err = installKismatic(nodes, opts, sshKey)
Expect(err).ToNot(HaveOccurred())
})
})
})
})