Skip to content

Commit

Permalink
More debug, let's look at the event stream as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
markmandel committed Mar 3, 2020
1 parent 080c49e commit bcd8835
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/e2e/gameserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes/scheme"
)

const (
Expand Down Expand Up @@ -502,6 +503,16 @@ func TestGameServerReserve(t *testing.T) {
gs, err = framework.WaitForGameServerState(readyGs, agonesv1.GameServerStateReady, 15*time.Second)
assert.NoError(t, err)
assert.Equal(t, agonesv1.GameServerStateReady, gs.Status.State)

list, err := framework.KubeClient.CoreV1().Events(defaultNs).Search(scheme.Scheme, readyGs)
assert.NoError(t, err)

for _, e := range list.Items {
logger.WithField("first-time", e.FirstTimestamp).WithField("count", e.Count).
WithField("last-time", e.LastTimestamp).
WithField("name", e.Name).
WithField("reason", e.Reason).WithField("message", e.Message).Info("event details")
}
}

func TestGameServerShutdown(t *testing.T) {
Expand Down

0 comments on commit bcd8835

Please sign in to comment.