Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Commit 076f84e

Browse files
authored
Docker image test (#799)
* Docker private image test * helloscratch
1 parent c37388e commit 076f84e

File tree

7 files changed

+54
-1
lines changed

7 files changed

+54
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
assets:
3+
v1:
4+
- docker:
5+
image: replicated/helloscratch:1.0.0
6+
source: public
7+
dest: docker/replicated-helloscratch-public.tar
8+
- docker:
9+
image: registry.staging.replicated.com/alpha/replicated-helloscratch:1.0.0
10+
source: replicated-qa
11+
dest: docker/replicated-helloscratch-private.tar
12+
config:
13+
v1: []
14+
lifecycle:
15+
v1:
16+
- render: {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"v1": {
3+
"config": {},
4+
"releaseName": "integration-test-docker",
5+
"upstream": "__upstream__",
6+
"metadata": {
7+
"applicationType": "replicated.app",
8+
"customerID": "__customerID__",
9+
"installationID": "__installationID__",
10+
"releaseNotes": "",
11+
"version": "1.0.0-SNAPSHOT"
12+
},
13+
"contentSHA": "a551e7640f88bd4d9e5843ea7602c046a1b89feae744c521bee558f9e44f0a69"
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
assets:
3+
v1:
4+
- docker:
5+
image: replicated/helloscratch:1.0.0
6+
source: public
7+
dest: docker/replicated-helloscratch-public.tar
8+
- docker:
9+
image: registry.staging.replicated.com/alpha/replicated-helloscratch:1.0.0
10+
source: replicated-qa
11+
dest: docker/replicated-helloscratch-private.tar
12+
config:
13+
v1: []
14+
lifecycle:
15+
v1:
16+
- render: {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
customer_id: "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G"
2+
installation_id: "rs9xXyYQZZuMIWMfha09Azl-XqmOoFxB"
3+
release_version: "1.0.0-SNAPSHOT"
4+
skip_cleanup: false

integration/init_app/integration_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/replicatedhq/ship/pkg/logger"
2222
"github.com/spf13/afero"
2323
"github.com/spf13/viper"
24-
"gopkg.in/yaml.v2"
24+
yaml "gopkg.in/yaml.v2"
2525
)
2626

2727
type TestMetadata struct {
@@ -68,6 +68,7 @@ var _ = Describe("ship init replicated.app/...", func() {
6868

6969
BeforeEach(func(done chan<- interface{}) {
7070
os.Setenv("NO_OS_EXIT", "1")
71+
os.Setenv("REPLICATED_REGISTRY", "registry.staging.replicated.com")
7172
// create a temporary directory within this directory to compare files with
7273
testOutputPath, err = ioutil.TempDir(testPath, "_test_")
7374
Expect(err).NotTo(HaveOccurred())
@@ -84,6 +85,7 @@ var _ = Describe("ship init replicated.app/...", func() {
8485
}, 20)
8586

8687
AfterEach(func() {
88+
os.Unsetenv("REPLICATED_REGISTRY")
8789
if !testMetadata.SkipCleanup && os.Getenv("SHIP_INTEGRATION_SKIP_CLEANUP_ALL") == "" {
8890
// remove the temporary directory
8991
err := os.RemoveAll(testOutputPath)

0 commit comments

Comments
 (0)