-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
80 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
version: "3" | ||
services: | ||
iot-agent-sdk-test: | ||
environment: | ||
- APP_ENV=test | ||
- TEST_HOST=iot-agent1 | ||
- LOG_LEVEL=DEBUG | ||
- TZ:"Europe/Berlin" | ||
build: | ||
dockerfile: test.Dockerfile | ||
context: ./ | ||
ports: | ||
- 8080:8080 | ||
depends_on: | ||
- iot-agent | ||
- mongodb | ||
- orion | ||
iot-agent: | ||
image: fiware/iotagent-ul:latest | ||
hostname: iot-agent | ||
depends_on: | ||
- mongodb | ||
expose: | ||
- "4061" | ||
- "7896" | ||
ports: | ||
- "4061:4061" | ||
- "7896:7896" | ||
environment: | ||
- "IOTA_CB_HOST=orion" | ||
- "IOTA_CB_PORT=1026" | ||
- "IOTA_NORTH_PORT=4061" | ||
- "IOTA_REGISTRY_TYPE=mongodb" | ||
- "IOTA_MONGO_HOST=mongodb" | ||
- "IOTA_MONGO_PORT=27017" | ||
- "IOTA_MONGO_DB=iotagent-ul" | ||
- "IOTA_HTTP_PORT=7896" | ||
- "IOTA_PROVIDER_URL=http://iot-agent:4061" | ||
mongodb: | ||
image: mongo:4.2 | ||
hostname: mongodb | ||
ports: | ||
- "27017:27017" | ||
command: --bind_ip_all | ||
orion: | ||
image: fiware/orion | ||
hostname: orion | ||
depends_on: | ||
- mongodb | ||
expose: | ||
- "1026" | ||
ports: | ||
- "1026:1026" | ||
command: -dbhost mongodb | ||
|
||
|
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,17 @@ | ||
# Use the official Go image as a base image | ||
FROM golang:latest | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Copy the go mod and sum files | ||
COPY go.mod go.sum ./ | ||
|
||
# Download all dependencies | ||
RUN go mod download | ||
|
||
# Copy the source from the current directory to the working directory inside the container | ||
COPY . . | ||
|
||
# Command to run the tests | ||
CMD ["go", "test", "-v", "./..."] |