We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ea21b9a + 9ab67a7 commit 5a22747Copy full SHA for 5a22747
pkg/pull/upstream_test.go
@@ -0,0 +1,33 @@
1
+package pull
2
+
3
+import (
4
+ "testing"
5
6
+ "github.com/stretchr/testify/assert"
7
+)
8
9
+func TestRewriteUpstream(t *testing.T) {
10
+ tests := []struct {
11
+ upstreamURI string
12
+ expected string
13
+ }{
14
+ {
15
+ upstreamURI: "app-slug",
16
+ expected: "replicated://app-slug",
17
+ },
18
19
+ upstreamURI: "app-slug/beta",
20
+ expected: "replicated://app-slug/beta",
21
22
23
+ upstreamURI: "helm://stable/mysql",
24
+ expected: "helm://stable/mysql",
25
26
+ }
27
+ for _, test := range tests {
28
+ t.Run(test.upstreamURI, func(t *testing.T) {
29
+ actual := RewriteUpstream(test.upstreamURI)
30
+ assert.Equal(t, actual, test.expected)
31
+ })
32
33
+}
0 commit comments