-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* publisher: log: add tests * worker: test for ack function * worker: tests: remove unused mocks * worker: add tests for error cases * worker: test: use constructor for tests * app: worker: fix flush always timing out * app: move kafka specific log messages to kafka publisher package * wip: worker metrics test * worker: add tests against instrumented metrics * worker: rename timeSource to Clock * chore: remove client example * worker: use idiomatic null device for tests * config: add tests for validation errors * config: add test for valid configuration * config: add tests for internal prepare() * config: add tests for Walk() * config: kafka: add tests for ToConfigMap() * config: kafka: add more tests for config map serializer * config: add tests for internal helper functions * refactor: extract Clock to a stand alone package * collector: add tests for TimePushed mutation * serialization: add tests for SerialiseProto * deserialization: add tests for DeserializeFunc * worker: add test for flush time out * config: refactor ack value names * tests: integration e2e tests results in coverage data * ci: test: fix coverage merge failing * ci: prospective fix for coverdata #1 * ci: prospective fix for coverdata #2 * ci: prospective fix for coverdata #3 * ci: upload test coverage as artifact * ci: refactor Docker build for release and testing * services: grpc: add tests for synchronous event handling * services: grpc: add tests to cover metric instrumentation * services: rest: remove deadcode For an incoming request, req.Body is never nil https://pkg.go.dev/net/http#Request * services: rest: add tests for error reading request body * services: rest: add tests for malformed request body * services: rest: refactor ack handling * services: rest: add tests for different error paths * ci: cache image pulls to speed up tests * ci: fix docker image caching * ci: ignore proto package during tests * ci: remove docker image caching * Revert "ci: ignore proto package during tests" This reverts commit 75d0807. * Revert "Revert "ci: ignore proto package during tests"" This reverts commit 1038f46. * Revert "Revert "Revert "ci: ignore proto package during tests""" This reverts commit a39cad6. * publisher: log: move test event to root proto package * ci: blacklist proto package during tests * hack: publisher: log: use single spaced fields * Revert "publisher: log: move test event to root proto package" This reverts commit 7f837bf. * Revert "ci: blacklist proto package during tests" This reverts commit 0856073. * Revert "hack: publisher: log: use single spaced fields" This reverts commit 5ffb846. * Revert "Revert "hack: publisher: log: use single spaced fields"" This reverts commit 67797d9. * ci: ignore proto folders when computing coverage * hack: publisher: log: use double spaced fields * ci: fix coverage data merge * ci: fix cover merge resulting in empty coverage file * publish: kinesis: add tests for stream's existence check * misc: improve test case description * publisher: kinesis: add tests for hitting rate limits and quotas * publisher: kinesis: refactor tests
- Loading branch information
Showing
49 changed files
with
1,666 additions
and
802 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
FROM golang:1.22.4 | ||
|
||
WORKDIR /app | ||
RUN apt-get update && apt-get install unzip --no-install-recommends --assume-yes | ||
RUN PROTOC_ZIP=protoc-3.17.3-linux-x86_64.zip && \ | ||
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/$PROTOC_ZIP && \ | ||
unzip -o $PROTOC_ZIP -d /usr/local bin/protoc && \ | ||
unzip -o $PROTOC_ZIP -d /usr/local 'include/*' && \ | ||
rm -f $PROTOC_ZIP | ||
COPY . . | ||
RUN make build | ||
|
||
|
||
FROM debian:bookworm-slim | ||
WORKDIR /app | ||
COPY --from=0 /app/raccoon ./raccoon | ||
ENTRYPOINT [ "/app/raccoon" ] | ||
COPY raccoon . | ||
ENTRYPOINT [ "/app/raccoon" ] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM golang:1.22.4 | ||
|
||
WORKDIR /app | ||
RUN apt-get update && apt-get install unzip --no-install-recommends --assume-yes | ||
RUN PROTOC_ZIP=protoc-3.17.3-linux-x86_64.zip && \ | ||
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/$PROTOC_ZIP && \ | ||
unzip -o $PROTOC_ZIP -d /usr/local bin/protoc && \ | ||
unzip -o $PROTOC_ZIP -d /usr/local 'include/*' && \ | ||
rm -f $PROTOC_ZIP | ||
COPY . . | ||
RUN make build-cov | ||
|
||
|
||
FROM debian:bookworm-slim | ||
WORKDIR /app | ||
COPY --from=0 /app/raccoon ./raccoon | ||
ENTRYPOINT [ "/app/raccoon" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package clock | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
// Clock represents a time source | ||
// It can be used as a way to abstract away the implicit | ||
// dependency on time.Now() from code. | ||
type Clock interface { | ||
Now() time.Time | ||
} | ||
|
||
type defaultClock struct{} | ||
|
||
func (defaultClock) Now() time.Time { | ||
return time.Now() | ||
} | ||
|
||
// Default clock. Uses time.Now() internally. | ||
var Default = defaultClock{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package clock | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/stretchr/testify/mock" | ||
) | ||
|
||
// Mock clock for testing | ||
type Mock struct { | ||
mock.Mock | ||
} | ||
|
||
func (m *Mock) Now() time.Time { | ||
return m.Called().Get(0).(time.Time) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.