Skip to content

Commit 6c18c82

Browse files
test infra
1 parent accdda9 commit 6c18c82

File tree

5 files changed

+133
-2
lines changed

5 files changed

+133
-2
lines changed

internal/integration/generated.go

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/integration/integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func TestSubscriptionConnectionParams(t *testing.T) {
244244

245245
func TestSubscriptionClose(t *testing.T) {
246246
_ = `# @genqlient
247-
subscription count { count }`
247+
subscription countClose { countClose }`
248248

249249
ctx := context.Background()
250250
server := server.RunServer()
@@ -271,7 +271,7 @@ func TestSubscriptionClose(t *testing.T) {
271271
_, err := wsClient.Start(ctx)
272272
require.NoError(t, err)
273273

274-
_, subscriptionID, err := count(ctx, wsClient)
274+
_, subscriptionID, err := countClose(ctx, wsClient)
275275
require.NoError(t, err)
276276

277277
if tc.unsub {

internal/integration/schema.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type Mutation {
2020
type Subscription {
2121
count: Int!
2222
countAuthorized: Int!
23+
countClose: Int!
2324
}
2425

2526
type User implements Being & Lucky {

internal/integration/server/gqlgen_exec.go

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/integration/server/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ func (s *subscriptionResolver) CountAuthorized(ctx context.Context) (<-chan int,
182182
return s.Count(ctx)
183183
}
184184

185+
func (s *subscriptionResolver) CountClose(ctx context.Context) (<-chan int, error) {
186+
return s.Count(ctx)
187+
}
188+
185189
const AuthKey = "authToken"
186190

187191
type (

0 commit comments

Comments
 (0)