elastic / elastic/elastic-package

test runner: check if the service network already exists

Open
#254 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
72
Forks
141
Avg merge
19h 42m
Merged PRs (30d)
55

Description

While investigating issues locally it's annoying to remove the service network, because it blocks next tests from execution:

```
➜ zoom git:(pkg-changelogs-1) elastic-package test system --data-streams webhook -v
2021/02/17 10:57:05 DEBUG Enable verbose logging
Run system tests for the package
2021/02/17 10:57:05 DEBUG setting up service...
2021/02/17 10:57:05 DEBUG setting up service using Docker Compose service deployer
2021/02/17 10:57:05 DEBUG running command: /usr/local/bin/docker-compose -f /Users/marcin.tojek/go/src/github.com/elastic/integrations/packages/zoom/_dev/deploy/docker/docker-compose.yml -p elastic-package-service up --build -d
elastic-package-service_zoom-webhook-http_1 is up-to-date
Starting elastic-package-service_zoom-webhook-https_1 ... done
2021/02/17 10:57:06 DEBUG attaching service container elastic-package-service_zoom-webhook-https_1 to stack network elastic-package-stack_default
Error: error running package system tests: could not complete test run: could not setup service: could not attach service container to the stack network (stderr="Error response from daemon: endpoint with name elastic-package-service_zoom-webhook-https_1 already exists in network elastic-package-stack_default\n"): exit status 1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with `elastic-package test system --data-streams webhook -v` and inspect `_dev/deploy/docker/docker-compose.yml` plus the service-network setup invoked by the test runner. Done means rerunning system tests does not fail when the service container endpoint already exists in `elastic-package-stack_default`.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, go
Domain
cli, devops, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.