Skip to content

Commit

Permalink
Use stable version of Go in CI
Browse files Browse the repository at this point in the history
We started developing in Go 1.21 because slog package became GA in Go
1.21. The toolchain directive in go.mod is new and only available in Go
1.21. We have to temporarily bump the Go version in CI to 'stable'. We
will provide compatibility to oldstable at a later date.

Signed-off-by: Aitor Perez Cedres <[email protected]>
  • Loading branch information
Zerpet committed Nov 17, 2023
1 parent 57bf7bc commit 947e258
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 92 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: oldstable
go-version: stable
# go-version: oldstable

- name: Build
run: make build
Expand Down Expand Up @@ -50,7 +51,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: oldstable
go-version: stable
# go-version: oldstable

- name: E2E Tests
env:
Expand Down
2 changes: 1 addition & 1 deletion pkg/e2e/end_to_end_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ var _ = Describe("E2E", Serial, Label("e2e"), func() {
streamClientConfiguration, err := raw.NewClientConfiguration(rabbitmqUri)
Expect(err).ToNot(HaveOccurred())
connectionName := "notify-disconnection-test-1"
streamClientConfiguration.SetConnectionName(connectionName)
streamClientConfiguration.ConnectionName = connectionName

By("preparing the environment")
streamClient, err := raw.DialConfig(itCtx, streamClientConfiguration)
Expand Down
83 changes: 0 additions & 83 deletions pkg/stream/environment_internal_test.go

This file was deleted.

15 changes: 9 additions & 6 deletions pkg/stream/environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,15 @@ var _ = Describe("Environment", func() {
Return(errors.New("something went wrong"))
})

It("logs the error and moves on", Pending, func() {
// TODO: the locator has its own logger, it does not use the logger
// from the context. This tests seems to make no sense, as the
// locator is appended by an utility function for tests, and
// this tests assumes that the locator uses the logger from context,
// which is not true. Revisit this test and its assumptions.
It("logs the error and moves on", func() {
Skip("the locator has its own logger, it does not use the logger from the context. This tests seems to make no sense, as the locator is appended by an utility function for tests, and this tests assumes that the locator uses the logger from context, which is not true. Revisit this test and its assumptions")
/*
TODO: the locator has its own logger, it does not use the logger
from the context. This tests seems to make no sense, as the locator is appended
by an utility function for tests, and this tests assumes that the locator uses
the logger from context, which is not true. Revisit this test and its
assumptions.
*/
logBuffer := gbytes.NewBuffer()
logger := slog.New(slog.NewTextHandler(logBuffer, nil))
ctx := raw.NewContextWithLogger(context.Background(), *logger)
Expand Down

0 comments on commit 947e258

Please sign in to comment.