| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| version: "3.7" |
| |
| services: |
| |
| gremlin-test-server: |
| container_name: gremlin-test-server |
| image: tinkerpop:gremlin-test-server-${GREMLIN_SERVER} |
| build: |
| context: ../ |
| dockerfile: gremlin-go/Dockerfile |
| args: |
| - GREMLIN_SERVER=${GREMLIN_SERVER} |
| ports: |
| - "45940:45940" |
| - "45941:45941" |
| volumes: |
| - ${HOME}/.groovy:/root/.groovy |
| - ${HOME}/.m2:/root/.m2 |
| |
| gremlin-go-integration-tests: |
| container_name: gremlin-go-integration-tests |
| image: golang:1.17 |
| volumes: |
| - .:/go_app |
| - ../gremlin-test/features:/gremlin-test |
| environment: |
| - CUCUMBER_FEATURE_FOLDER=/gremlin-test |
| - GREMLIN_SERVER_URL=ws://gremlin-test-server:45940/gremlin |
| - GREMLIN_SERVER_BASIC_AUTH_URL=wss://gremlin-test-server:45941/gremlin |
| - RUN_INTEGRATION_TESTS=true |
| - RUN_INTEGRATION_WITH_ALIAS_TESTS=true |
| - RUN_BASIC_AUTH_INTEGRATION_TESTS=true |
| - TEST_TRANSACTIONS=true |
| working_dir: /go_app |
| command: > |
| bash -c "apt-get update && apt-get install dos2unix && dos2unix ./wait-for-server.sh |
| && ./wait-for-server.sh gremlin-test-server 45940 300 |
| && go install github.com/haveyoudebuggedit/gotestfmt/v2/cmd/gotestfmt@latest |
| && go test -v -json ./... -race -covermode=atomic -coverprofile=\"coverage.out\" -coverpkg=./... | gotestfmt" |
| depends_on: |
| - gremlin-test-server |