mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:17:33 +00:00
fix mock
This commit is contained in:
@@ -27,6 +27,8 @@ services:
|
||||
network_mode: host
|
||||
build:
|
||||
context: ../../apps/login/integration/core-mock
|
||||
additional_contexts:
|
||||
- zitadel-protos=../../proto
|
||||
cache_from:
|
||||
- type=gha
|
||||
cache_to:
|
||||
|
9
.github/workflows/login-integration-test.yml
vendored
9
.github/workflows/login-integration-test.yml
vendored
@@ -21,10 +21,6 @@ jobs:
|
||||
run: npm install -g @devcontainers/cli@0.80.0
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Print Config
|
||||
run: COMPOSE_BAKE=1 docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration-ci/docker-compose.yaml config login-integration
|
||||
env:
|
||||
LOGIN_TAG: ${{ inputs.login_build_image }}
|
||||
- name: Pull Login Build Image
|
||||
run: docker pull ${{ inputs.login_build_image }}
|
||||
- name: Run Integration Tests against the Login and a Mocked Zitadel API
|
||||
@@ -39,6 +35,11 @@ jobs:
|
||||
- name: Show Compose Status
|
||||
if: failure()
|
||||
run: docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration-ci/docker-compose.yaml ps
|
||||
- name: Print Config
|
||||
if: failure()
|
||||
run: COMPOSE_BAKE=1 docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration-ci/docker-compose.yaml config login-integration
|
||||
env:
|
||||
LOGIN_TAG: ${{ inputs.login_build_image }}
|
||||
- name: Show Container Logs
|
||||
if: failure()
|
||||
run: docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration-ci/docker-compose.yaml logs --timestamps --no-color --tail 100 login-integration
|
||||
|
@@ -1,8 +1,10 @@
|
||||
FROM bufbuild/buf:1.54.0 AS proto-files
|
||||
RUN buf export https://github.com/envoyproxy/protoc-gen-validate.git --path validate --output /proto-files && \
|
||||
buf export https://github.com/grpc-ecosystem/grpc-gateway.git --path protoc-gen-openapiv2 --output /proto-files && \
|
||||
buf export https://github.com/googleapis/googleapis.git --path protos/zitadelgoogle/api/annotations.proto --path google/api/http.proto --path google/api/field_behavior.proto --output /proto-files && \
|
||||
buf export https://github.com/zitadel/zitadel.git --path ./proto/zitadel --output /proto-files
|
||||
FROM bufbuild/buf:1.54.0 AS dependencies
|
||||
RUN buf export https://github.com/envoyproxy/protoc-gen-validate.git --path validate --output /proto && \
|
||||
buf export https://github.com/grpc-ecosystem/grpc-gateway.git --path protoc-gen-openapiv2 --output /proto && \
|
||||
buf export https://github.com/googleapis/googleapis.git --path google/api/annotations.proto --path google/api/http.proto --path google/api/field_behavior.proto --output /proto
|
||||
|
||||
FROM bufbuild/buf:1.54.0 AS zitadel-protos
|
||||
RUN buf export https://github.com/zitadel/zitadel.git --path ./proto/zitadel --output /zitadel
|
||||
|
||||
FROM golang:1.20.5-alpine3.18 AS mock-zitadel
|
||||
|
||||
@@ -10,6 +12,7 @@ RUN go install github.com/eliobischof/grpc-mock/cmd/grpc-mock@01b09f60db1b501178
|
||||
|
||||
COPY mocked-services.cfg .
|
||||
COPY initial-stubs initial-stubs
|
||||
COPY --from=proto-files /proto-files/ ./
|
||||
COPY --from=dependencies /proto/ ./
|
||||
COPY --from=zitadel-protos /zitadel/ ./zitadel/
|
||||
|
||||
ENTRYPOINT [ "sh", "-c", "grpc-mock -v 1 -proto $(tr '\n' ',' < ./mocked-services.cfg) -stub-dir ./initial-stubs -mock-addr :22222" ]
|
||||
|
Reference in New Issue
Block a user