-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add stdin_open, tty support, add tests, fix #344 #350
Conversation
@@ -428,6 +434,8 @@ func (k *Kubernetes) InitPod(name string, service kobject.ServiceConfig) *api.Po | |||
{ | |||
Name: name, | |||
Image: service.Image, | |||
Stdin: service.Stdin, | |||
TTY: service.Tty, |
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.
as opposed to doing it in multiple places you can do it in one place https://github.com/kubernetes-incubator/kompose/blob/master/pkg/transformer/kubernetes/k8sutils.go#L327
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, thanks!
@@ -60,6 +62,15 @@ func TestInitDeploymentConfig(t *testing.T) { | |||
if spec.Spec.Triggers[1].ImageChangeParams.ContainerNames[0] != "myfoobarname" { | |||
t.Errorf("Expected myfoobarname for name, actual %s", spec.Spec.Triggers[1].ImageChangeParams.ContainerNames[0]) | |||
} | |||
|
|||
if spec.Spec.Template.Spec.Containers[0].Stdin != true { |
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 we create a separate test? Because, this test gets hidden and never shows on output as this was tested?
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.
Added another test instead of this!
func TestOpenShiftUpdateKubernetesObjects(t *testing.T) { | ||
var object []runtime.Object | ||
o := OpenShift{} | ||
serviceConfig := newServiceConfig() |
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.
A log saying what this test runs will help.
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.
Similar comments are missing in other tests!
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 for TestOpenShiftUpdateKubernetesObjects
, log messages for other tests should go in another PR. Tracked at #351
apart from those two comments LGTM! |
This adds supports for stdin_open: bool and tty: bool support for kubernetes and openshift providers in kompose. This maps to the template.Spec.Containers[0].Stdin and template.Spec.Containers[0].TTY in Kubernets world. Also, added tests. Fixes kubernetes#344
@containscafeine awesome work 👍 |
This adds supports for stdin_open: bool and
tty: bool support for kubernetes and openshift
providers in kompose. This maps to the
template.Spec.Containers[0].Stdin and
template.Spec.Containers[0].TTY in Kubernets
world.
Also, added tests.
Fixes #344