Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test-build:
name: 👷 Test & Build ${{ matrix.goVer }}${{ matrix.label }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
name: 👮 Lint
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
reviewdog:
name: 🐶 Reviewdog
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scheduled_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
# Monday at 9:00 UTC
- cron: "0 9 * * 1"

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down
16 changes: 12 additions & 4 deletions chat_channel_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,21 @@ func TestChatChannelIntegration(t *testing.T) {
assert.Equal(t, "red", resp.Data.Channel.Custom["color"])

// Unset fields
resp, err = ch.UpdateChannelPartial(ctx, &UpdateChannelPartialRequest{
_, err = ch.UpdateChannelPartial(ctx, &UpdateChannelPartialRequest{
Unset: []string{"color"},
})
require.NoError(t, err)
require.NotNil(t, resp.Data.Channel)
_, hasColor := resp.Data.Channel.Custom["color"]
assert.False(t, hasColor, "color should be unset")

// The response can be hydrated from a read replica that has not observed
// the write yet, so re-read until the unset field disappears.
require.Eventually(t, func() bool {
resp, err := ch.GetOrCreate(ctx, &GetOrCreateChannelRequest{})
if err != nil || resp.Data.Channel == nil {
return false
}
_, hasColor := resp.Data.Channel.Custom["color"]
return !hasColor
}, 5*time.Second, 500*time.Millisecond, "color should be unset")
})

t.Run("DeleteChannel", func(t *testing.T) {
Expand Down
Loading