Skip to content
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

Missed a couple of small things in last PR #175

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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