Skip to content

Commit

Permalink
fix: lint & test
Browse files Browse the repository at this point in the history
  • Loading branch information
antiphp committed Dec 10, 2024
1 parent f91758f commit 4e338b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sdkserver/localsdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func TestLocalSDKServerSetAnnotations(t *testing.T) {
assertInitialWatchUpdate(t, stream)

// make sure length of l.updateObservers is at least 1
err = wait.PollUntilContextTimeout(context.Background(), time.Second, 10*time.Second, true, func(ctx context.Context) (bool, error) {
err = wait.PollUntilContextTimeout(context.Background(), time.Second, 10*time.Second, true, func(context.Context) (bool, error) {
ret := false
l.updateObservers.Range(func(_, _ interface{}) bool {
ret = true
Expand Down
7 changes: 7 additions & 0 deletions sdks/go/sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ func (m *sdkMock) SetAnnotation(_ context.Context, in *sdk.KeyValue, _ ...grpc.C
return &sdk.Empty{}, nil
}

func (m *sdkMock) SetAnnotations(_ context.Context, in *sdk.KeyValues, _ ...grpc.CallOption) (*sdk.Empty, error) {
for _, kv := range in.KeyValues {
m.annotations["agones.dev/sdk-"+kv.Key] = kv.Value
}
return &sdk.Empty{}, nil
}

func (m *sdkMock) WatchGameServer(_ context.Context, _ *sdk.Empty, _ ...grpc.CallOption) (sdk.SDK_WatchGameServerClient, error) {
return m.wm, nil
}
Expand Down

0 comments on commit 4e338b1

Please sign in to comment.