2026-04-23 18:13:14: merge [main:68f79a6bfeb51395820e04cbe827b53c156c0c31];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s

This commit is contained in:
txix committed 2026-04-23 18:13:14 +03:00
1 parent d4091f8805
commit a42aeacad0
10 files changed
+145 -138

No files matched your search

+4 -7
View File
@@ -47,7 +47,7 @@ func (s *AcceptanceTestSuite) SetupSuite() {
var grpcMockAddr string
s.grpcMock, grpcMockAddr = newGrpcMockWithEndpoints(t, map[string]any{
"grpc/alive_backend/endpoint": func() string { return "GRPC_OK" },
"api/grpc/alive_backend/endpoint": func() string { return "GRPC_OK" },
"api/grpc/alive_backend/endpoint_v2": func() string { return "GRPC_API" },
"grpc/alive_backend/endpoint_with_error": func() error {
return status.Error(codes.FailedPrecondition, "test error")
@@ -72,7 +72,7 @@ func (s *AcceptanceTestSuite) SetupSuite() {
Version: "1.0.0",
LibVersion: "1.0.0",
Endpoints: []cluster.EndpointDescriptor{
{Path: "grpc/alive_backend/endpoint"},
{Path: "api/grpc/alive_backend/endpoint"},
{Path: "api/grpc/alive_backend/endpoint_v2"},
{Path: "grpc/alive_backend/endpoint_with_error"},
},
@@ -159,12 +159,10 @@ func (s *AcceptanceTestSuite) TestUnknownEndpoint() {
}
func (s *AcceptanceTestSuite) TestDeadBackend() {
s.assertStatus(http.MethodPost, "/api/dead_backend/endpoint", http.StatusServiceUnavailable)
s.assertStatus(http.MethodPost, "/dead_backend/endpoint", http.StatusServiceUnavailable)
}
func (s *AcceptanceTestSuite) TestGrpcReuseEndpoint() {
s.assertJsonResponse(http.MethodPost, "api/reuse_backend/endpoint", "REUSE")
s.assertJsonResponse(http.MethodPost, "reuse_backend/endpoint", "REUSE")
}
@@ -175,24 +173,23 @@ func (s *AcceptanceTestSuite) TestGrpcAliveEndpoint() {
func (s *AcceptanceTestSuite) TestGrpcAliveApiEndpoint() {
s.assertJsonResponse(http.MethodPost, "api/grpc/alive_backend/endpoint_v2", "GRPC_API")
s.assertJsonResponse(http.MethodPost, "grpc/alive_backend/endpoint_v2", "GRPC_API")
}
func (s *AcceptanceTestSuite) TestGrpcEndpointWithError() {
s.assertStatus(http.MethodPost, "api/grpc/alive_backend/endpoint_with_error", http.StatusPreconditionFailed)
s.assertStatus(http.MethodPost, "grpc/alive_backend/endpoint_with_error", http.StatusPreconditionFailed)
}
func (s *AcceptanceTestSuite) TestHttpAliveEndpoint() {
s.assertJsonResponse(http.MethodGet, "/api/alive_backend/endpoint", "HTTP_OK")
s.assertJsonResponse(http.MethodGet, "/alive_backend/endpoint", "HTTP_OK")
}
func (s *AcceptanceTestSuite) TestHttpAliveApiEndpoint() {
s.assertJsonResponse(http.MethodGet, "/api/alive_backend/endpoint_v2", "HTTP_API")
s.assertJsonResponse(http.MethodGet, "/alive_backend/endpoint_v2", "HTTP_API")
}
func (s *AcceptanceTestSuite) TestHttpEndpointWithError() {
s.assertStatus(http.MethodPost, "/api/alive_backend/endpoint_with_error", http.StatusPreconditionFailed)
s.assertStatus(http.MethodPost, "/alive_backend/endpoint_with_error", http.StatusPreconditionFailed)
}