Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): update bin #61

Merged
merged 2 commits into from
Nov 3, 2023
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
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ jobs:
build:
docker:
- image: alexfalkowski/go:1.21-3.2
- image: alexfalkowski/status:latest
command: server
environment:
CONFIG_FILE: yaml:CONFIG
CONFIG: ZW52aXJvbm1lbnQ6IHByb2R1Y3Rpb24KaGVhbHRoOgogIGR1cmF0aW9uOiAxcwogIHRpbWVvdXQ6IDFzCnRlbGVtZXRyeToKICBsb2dnZXI6CiAgICBsZXZlbDogaW5mbwogIHRyYWNlcjoKICAgIGhvc3Q6IGxvY2FsaG9zdDo0MzE4CiAgICBzZWN1cmU6IGZhbHNlCnRyYW5zcG9ydDoKICBodHRwOgogICAgcG9ydDogNjAwMAogICAgdXNlcl9hZ2VudDogIlN0YXR1cy1zZXJ2ZXIvMS4wIGh0dHAvMS4wIgogICAgcmV0cnk6CiAgICAgIHRpbWVvdXQ6IDJzCiAgICAgIGF0dGVtcHRzOiAzCiAgZ3JwYzoKICAgIGVuYWJsZWQ6IHRydWUKICAgIHBvcnQ6IDYwMDEKICAgIHVzZXJfYWdlbnQ6ICJTdGF0dXMtc2VydmVyLzEuMCBncnBjLzEuMCIKICAgIHJldHJ5OgogICAgICB0aW1lb3V0OiAycwogICAgICBhdHRlbXB0czogMwo=
steps:
- checkout
- run: git submodule sync
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.PHONY: vendor

include bin/build/make/go.mak

# Encode a config.
encode-config:
cat test/$(kind).yml | base64
2 changes: 1 addition & 1 deletion bin
Submodule bin updated 2 files
+4 −0 CHANGELOG.md
+0 −7 build/ruby/solargraph
13 changes: 7 additions & 6 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestInvalidCodeHTTPChecker(t *testing.T) {
defer s.Stop()

name := "httpstat400"
checker := checker.NewHTTPChecker("https://httpstat.us/400", &http.Client{Timeout: defaultTimeout()})
checker := checker.NewHTTPChecker("http://localhost:6000/v1/status/400", &http.Client{Timeout: defaultTimeout()})
r := server.NewRegistration(name, defaultPeriod(), checker)

s.Register(r)
Expand All @@ -158,7 +158,8 @@ func TestTimeoutHTTPChecker(t *testing.T) {
defer s.Stop()

name := "httpstat200"
checker := checker.NewHTTPChecker("https://httpstat.us/200?sleep=6000", &http.Client{Timeout: defaultTimeout()})
c := &http.Client{Timeout: defaultTimeout()}
checker := checker.NewHTTPChecker("http://localhost:6000/v1/status/200?sleep=5s", c)
r := server.NewRegistration(name, defaultPeriod(), checker)

s.Register(r)
Expand Down Expand Up @@ -321,7 +322,7 @@ func TestInvalidObserver(t *testing.T) {
s := server.NewServer()
defer s.Stop()

cc := checker.NewHTTPChecker("https://httpstat.us/400", &http.Client{Timeout: defaultTimeout()})
cc := checker.NewHTTPChecker("http://localhost:6000/v1/status/400", &http.Client{Timeout: defaultTimeout()})
hr := server.NewRegistration("http1", defaultPeriod(), cc)
tc := checker.NewTCPChecker("httpstat.us:9000", defaultTimeout())
tr := server.NewRegistration("tcp1", defaultPeriod(), tc)
Expand All @@ -347,7 +348,7 @@ func TestValidObserver(t *testing.T) {
s := server.NewServer()
defer s.Stop()

cc := checker.NewHTTPChecker("https://httpstat.us/200", &http.Client{Timeout: defaultTimeout()})
cc := checker.NewHTTPChecker("http://localhost:6000/v1/status/200", &http.Client{Timeout: defaultTimeout()})
hr := server.NewRegistration("http", defaultPeriod(), cc)
tc := checker.NewTCPChecker("httpstat.us:80", defaultTimeout())
tr := server.NewRegistration("tcp", defaultPeriod(), tc)
Expand All @@ -373,7 +374,7 @@ func TestOneInvalidObserver(t *testing.T) {
s := server.NewServer()
defer s.Stop()

cc := checker.NewHTTPChecker("https://httpstat.us/500", &http.Client{Timeout: defaultTimeout()})
cc := checker.NewHTTPChecker("http://localhost:6000/v1/status/500", &http.Client{Timeout: defaultTimeout()})
hr := server.NewRegistration("http", defaultPeriod(), cc)
tc := checker.NewTCPChecker("httpstat.us:80", defaultTimeout())
tr := server.NewRegistration("tcp", defaultPeriod(), tc)
Expand All @@ -399,7 +400,7 @@ func TestNonExistentObserver(t *testing.T) {
s := server.NewServer()
defer s.Stop()

cc := checker.NewHTTPChecker("https://httpstat.us/200", &http.Client{Timeout: defaultTimeout()})
cc := checker.NewHTTPChecker("http://localhost:6000/v1/status/200", &http.Client{Timeout: defaultTimeout()})
hr := server.NewRegistration("http", defaultPeriod(), cc)
tc := checker.NewTCPChecker("httpstat.us:80", defaultTimeout())
tr := server.NewRegistration("tcp", defaultPeriod(), tc)
Expand Down
24 changes: 24 additions & 0 deletions test/status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
environment: production
health:
duration: 1s
timeout: 1s
telemetry:
logger:
level: info
tracer:
host: localhost:4318
secure: false
transport:
http:
port: 6000
user_agent: "Status-server/1.0 http/1.0"
retry:
timeout: 2s
attempts: 3
grpc:
enabled: true
port: 6001
user_agent: "Status-server/1.0 grpc/1.0"
retry:
timeout: 2s
attempts: 3
Loading