-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
99440a0
to
40dc349
Compare
pkg/api/render_test.go
Outdated
|
||
func TestDecode(t *testing.T) { | ||
tcs := map[string]string{ | ||
"podpreset.yaml": ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this into an actual file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -8,7 +8,7 @@ import ( | |||
"github.com/rebuy-de/kubernetes-deployment/pkg/templates" | |||
log "github.com/sirupsen/logrus" | |||
"k8s.io/apimachinery/pkg/runtime" | |||
"k8s.io/client-go/pkg/api" | |||
"k8s.io/client-go/kubernetes/scheme" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such stable APU. Much wow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if this is still required:
kubernetes-deployment/pkg/api/init.go
Lines 8 to 17 in 8c23e8d
import ( | |
_ "k8s.io/client-go/pkg/api/install" | |
_ "k8s.io/client-go/pkg/apis/apps/install" | |
_ "k8s.io/client-go/pkg/apis/authentication/install" | |
_ "k8s.io/client-go/pkg/apis/autoscaling/install" | |
_ "k8s.io/client-go/pkg/apis/batch/install" | |
_ "k8s.io/client-go/pkg/apis/extensions/install" | |
_ "k8s.io/client-go/pkg/apis/policy/install" | |
_ "k8s.io/client-go/pkg/apis/storage/install" | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appears to no longer be needed.
15d7bb6
to
fe07a81
Compare
pkg/api/render_test.go
Outdated
func TestDecode(t *testing.T) { | ||
dir := "test-fixtures" | ||
tcs := map[string]string{ | ||
"manifest-deployment.yaml": "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about this:
"manifest-deployment.yaml": readFile(t, path.Join(dir, "manifest-deployment.yaml")),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that works too and is more succinct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
fe07a81
to
8df185d
Compare
0274767
to
054c017
Compare
added file struct
@rebuy-de/prp-kubernetes-deployment - PTAL |
@rebuy-de/prp-kubernetes-deployment - PTAL
Some of the capabilities for decoding manifests have moved to
client-go/kubernetes/schema
.Separated
app.Render
for easier testability ofscheme.Codecs.UniversalDeserializer().Decode()
.pkg/api/render_test.go
is not pretty. On the upside: no added file i/o in the "unit test". Very much open to suggestions.See: