Skip to content

Commit

Permalink
Merge pull request #175 from markmandel/cleanup/small-missing-bits
Browse files Browse the repository at this point in the history
Missed a couple of small things in last PR
  • Loading branch information
markmandel authored Apr 14, 2018
2 parents 184402e + 1e69141 commit afd53d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/stable/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func addKnownTypes(scheme *k8sruntime.Scheme) error {
&GameServerList{},
&GameServerSet{},
&GameServerSetList{},
&Fleet{},
&FleetList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
Expand Down
3 changes: 3 additions & 0 deletions pkg/fleets/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ func TestControllerUpdateFleetStatus(t *testing.T) {
return true, &v1alpha1.GameServerSetList{Items: []v1alpha1.GameServerSet{*gsSet1, *gsSet2}}, nil
})

updated := false
m.AgonesClient.AddReactor("update", "fleets",
func(action k8stesting.Action) (bool, runtime.Object, error) {
updated = true
ua := action.(k8stesting.UpdateAction)
fleet := ua.GetObject().(*v1alpha1.Fleet)

Expand All @@ -269,6 +271,7 @@ func TestControllerUpdateFleetStatus(t *testing.T) {

err := c.updateFleetStatus(fleet)
assert.Nil(t, err)
assert.True(t, updated)
}

// newFakeController returns a controller, backed by the fake Clientset
Expand Down

0 comments on commit afd53d2

Please sign in to comment.