-
Notifications
You must be signed in to change notification settings - Fork 823
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
Test NodeJS image #3498
Test NodeJS image #3498
Changes from 7 commits
fd47909
dde62a9
440d299
3d34e7a
b6684de
486178a
4fe8a2d
1150d30
d3a4537
4919f01
006dde2
490892f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -65,11 +65,11 @@ func TestSuperTuxKartGameServerReady(t *testing.T) { | |||||||||
assert.Equal(t, agonesv1.GameServerStateReady, readyGs.Status.State) | ||||||||||
} | ||||||||||
|
||||||||||
func TestRustGameServerReady(t *testing.T) { | ||||||||||
func TestCppSimpleGameServerReady(t *testing.T) { | ||||||||||
t.Parallel() | ||||||||||
gs := &agonesv1.GameServer{ | ||||||||||
ObjectMeta: metav1.ObjectMeta{ | ||||||||||
GenerateName: "rust-simple-", | ||||||||||
GenerateName: "cpp-simple-", | ||||||||||
}, | ||||||||||
Spec: agonesv1.GameServerSpec{ | ||||||||||
Ports: []agonesv1.GameServerPort{{ | ||||||||||
|
@@ -82,8 +82,8 @@ func TestRustGameServerReady(t *testing.T) { | |||||||||
Spec: corev1.PodSpec{ | ||||||||||
Containers: []corev1.Container{ | ||||||||||
{ | ||||||||||
Name: "rust-simple", | ||||||||||
Image: "us-docker.pkg.dev/agones-images/examples/rust-simple-server:0.11", | ||||||||||
Name: "cpp-simple", | ||||||||||
Image: "us-docker.pkg.dev/agones-images/examples/cpp-simple-server:0.15", | ||||||||||
}, | ||||||||||
}, | ||||||||||
}, | ||||||||||
|
@@ -99,11 +99,11 @@ func TestRustGameServerReady(t *testing.T) { | |||||||||
assert.Equal(t, agonesv1.GameServerStateReady, readyGs.Status.State) | ||||||||||
} | ||||||||||
|
||||||||||
func TestCppSimpleGameServerReady(t *testing.T) { | ||||||||||
func TestNodeJSGameServerReady(t *testing.T) { | ||||||||||
t.Parallel() | ||||||||||
gs := &agonesv1.GameServer{ | ||||||||||
ObjectMeta: metav1.ObjectMeta{ | ||||||||||
GenerateName: "cpp-simple-", | ||||||||||
GenerateName: "nodejs-simple-", | ||||||||||
}, | ||||||||||
Spec: agonesv1.GameServerSpec{ | ||||||||||
Ports: []agonesv1.GameServerPort{{ | ||||||||||
|
@@ -112,12 +112,50 @@ func TestCppSimpleGameServerReady(t *testing.T) { | |||||||||
ContainerPort: 7654, | ||||||||||
Protocol: corev1.ProtocolUDP, | ||||||||||
}}, | ||||||||||
Health: agonesv1.Health{ | ||||||||||
InitialDelaySeconds: 300, | ||||||||||
markmandel marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
PeriodSeconds: 25, | ||||||||||
}, | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you do me a favour - can we remove the Health settings, and we can test without it?
Suggested change
We shouldn't have to make them so long now, since it looks like it was a resource setting issue that we fixed below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this health settings indicated that the GameServer reached a terminal 'Unhealthy' state upon testing- https://gist.github.com/Kalaiselvi84/8d7a212a93c04291d42f90476c0fcb7f There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even with the resource settings? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep! it fails with resource and without health. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yeah it would! Because it does't make health calls very often! Okay, let's try a small number - probably: Health: agonesv1.Health{
InitialDelaySeconds: 30,
PeriodSeconds: 30,
}, Should be a good fit. |
||||||||||
Template: corev1.PodTemplateSpec{ | ||||||||||
Spec: corev1.PodSpec{ | ||||||||||
Containers: []corev1.Container{ | ||||||||||
{ | ||||||||||
Name: "cpp-simple", | ||||||||||
Image: "us-docker.pkg.dev/agones-images/examples/cpp-simple-server:0.15", | ||||||||||
Name: "nodejs-simple", | ||||||||||
Image: "us-docker.pkg.dev/agones-images/examples/nodejs-simple-server:0.9", | ||||||||||
}, | ||||||||||
}, | ||||||||||
}, | ||||||||||
}, | ||||||||||
}, | ||||||||||
} | ||||||||||
|
||||||||||
// Use the e2e framework's function to create the GameServer and wait until it's ready | ||||||||||
readyGs, err := framework.CreateGameServerAndWaitUntilReady(t, framework.Namespace, gs) | ||||||||||
require.NoError(t, err) | ||||||||||
|
||||||||||
// Assert that the GameServer is in the expected state | ||||||||||
assert.Equal(t, agonesv1.GameServerStateReady, readyGs.Status.State) | ||||||||||
} | ||||||||||
|
||||||||||
func TestRustGameServerReady(t *testing.T) { | ||||||||||
t.Parallel() | ||||||||||
gs := &agonesv1.GameServer{ | ||||||||||
ObjectMeta: metav1.ObjectMeta{ | ||||||||||
GenerateName: "rust-simple-", | ||||||||||
}, | ||||||||||
Spec: agonesv1.GameServerSpec{ | ||||||||||
Ports: []agonesv1.GameServerPort{{ | ||||||||||
Name: "default", | ||||||||||
PortPolicy: agonesv1.Dynamic, | ||||||||||
ContainerPort: 7654, | ||||||||||
Protocol: corev1.ProtocolUDP, | ||||||||||
}}, | ||||||||||
Template: corev1.PodTemplateSpec{ | ||||||||||
Spec: corev1.PodSpec{ | ||||||||||
Containers: []corev1.Container{ | ||||||||||
{ | ||||||||||
Name: "rust-simple", | ||||||||||
Image: "us-docker.pkg.dev/agones-images/examples/rust-simple-server:0.11", | ||||||||||
}, | ||||||||||
}, | ||||||||||
}, | ||||||||||
|
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 just noticed this here switched from Rus to CPP - was that deliberate?
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 tried to keep the e2e tests in the order you mentioned in the ticket - https://buganizer.corp.google.com/issues/309492114#comment1
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.
The order doesn't matter at all. You can revert these changes 👍🏻