Skip to content

Commit

Permalink
Review updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
markmandel committed Dec 1, 2022
1 parent 6f2ae75 commit 3a39772
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e/gameserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ func TestHostName(t *testing.T) {
gs.ObjectMeta.GenerateName = "game-server-1.0-"
},
test: func(gs *agonesv1.GameServer, pod *corev1.Pod) {
assert.Equal(t, strings.ReplaceAll(gs.ObjectMeta.Name, ".", "-"), pod.Spec.Hostname)
expected := "game-server-1-0-"
// since it's a generated name, we just check the beginning.
assert.Equal(t, expected, pod.Spec.Hostname[:len(expected)])
},
},
// generated name will automatically truncate to 63 chars.
Expand Down

0 comments on commit 3a39772

Please sign in to comment.