# Test failure error:beats

**URL:** <https://discuss.elastic.co/t/test-failure-error-beats/182638>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 24, 2019, 11:42am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638 "2019-05-24T11:42:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![john5](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@john5](https://discuss.elastic.co/u/john5)\
**Post date:** [May 24, 2019, 11:42am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/1 "2019-05-24T11:42:10Z")

</div>

Heloo,

i am running test suit on beat version 6.4.1 and getting some error.

**Steps:**

1. Clone beats source code from git
2. Download and set GO lang and GOPATH.
3. Run `make testsuite` command.

**o/p:**

> ```
> command [go test -cover -coverprofile /tmp/gotestcover-206680631 github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata]: exit status 2
> # github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata
> /usr/local/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:106: Debug call has arguments but no formatting directives
> /usr/local/go/src/github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata/kubernetes.go:115: Err format %t has arg &kubernetes.Pod{} of wrong type *github.com/elastic/beats/vendor/github.com/ericchiang/k8s/apis/core/v1.Pod
> FAIL	github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata [build failed]
> ? github.com/elastic/beats/libbeat/publisher/queue	[no test files]
> ? github.com/elastic/beats/libbeat/publisher/queue/queuetest	[no test files]
> ? github.com/elastic/beats/libbeat/service	[no test files]
> ok github.com/elastic/beats/libbeat/publisher/testing	0.007s	coverage: 53.3% of statements
> ok github.com/elastic/beats/libbeat/publisher/pipeline	0.014s	coverage: 6.1% of statements
> ok github.com/elastic/beats/libbeat/template	0.007s	coverage: 54.8% of statements
> ok github.com/elastic/beats/libbeat/testing	0.007s	coverage: 87.3% of statements
> ? github.com/elastic/beats/libbeat/tests/compose	[no test files]
> ? github.com/elastic/beats/libbeat/version	[no test files]
> ok github.com/elastic/beats/libbeat/testing/mapvaltest	0.009s	coverage: 100.0% of statements
> ? github.com/elastic/beats/libbeat/tests/docker	[no test files]
> ok github.com/elastic/beats/libbeat/publisher/queue/memqueue	1.883s	coverage: 76.8% of statements
> ok github.com/elastic/beats/libbeat/outputs/logstash	10.158s	coverage: 73.0% of statements
> ok github.com/elastic/beats/libbeat/publisher/queue/spool	4.888s	coverage: 61.9% of statements
> test failed
> make[2]: *** [unit-tests] Error 1
> make[2]: Leaving directory `/root/gocode/src/github.com/elastic/beats/libbeat'
> make[1]: *** [testsuite] Error 2
> make[1]: Leaving directory `/root/gocode/src/github.com/elastic/beats/libbeat'
> make: *** [testsuite] Error 1
> 
> ```

Test suite is failed.

If i run the command as below:  
`make testsuite -i`

its ignoring the failed test and going for docker-compose file and giving another error as below.  
**o/p:**  
**ignored as previous failed:**

> ```
> ok github.com/elastic/beats/libbeat/outputs/logstash	10.116s	coverage: 73.0% of statements
> ok github.com/elastic/beats/libbeat/publisher/queue/spool	6.633s	coverage: 61.1% of statements
> test failed
> make[2]: [unit-tests] Error 1 (ignored)
> make[2]: Leaving directory `/root/gocode/src/github.com/elastic/beats/libbeat'
> if [false = true]; then \
> make stress-tests; \
> fi
> # Setups environment if TEST_ENVIRONMENT is set to true
> # Only runs integration tests with test environment
> if [true = true]; then \
> make integration-tests-environment; \
> fi
> 
> ```

Docker-compose error:

> ```
> ---> ed94d92da038
> Removing intermediate container c0ee3dbc03cf
> Step 15/31 : RUN /download.sh $DOWNLOAD_URL $ELASTIC_VERSION $CACHE_BUST && rm /download.sh
> ---> Running in 55efc8cb0e36
> 
> Removing intermediate container 55efc8cb0e36
> ERROR: Service 'elasticsearch' failed to build: The command '/bin/sh -c /download.sh $DOWNLOAD_URL $ELASTIC_VERSION $CACHE_BUST && rm /download.sh' returned a non-zero code: 28
> make[2]: [build-image] Error 1 (ignored)
> 
> ```

anyone help??

---

<div class="post-metadata">

**Author:** ![john5](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@john5](https://discuss.elastic.co/u/john5)\
**Post date:** [May 26, 2019, 3:18am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/2 "2019-05-26T03:18:27Z")

</div>

Hi  
can anyone help on this???

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [May 27, 2019, 1:59pm UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/3 "2019-05-27T13:59:53Z")

</div>

Is there a specific reason you run on 6.4 and not 7.1 for example? Seeing some of the errors it could be that you use a different Golang version then was used for developing 6.4?

---

<div class="post-metadata">

**Author:** ![john5](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@john5](https://discuss.elastic.co/u/john5)\
**Post date:** [May 28, 2019, 5:25am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/4 "2019-05-28T05:25:21Z")

</div>

Hi @ruflin,

Thank you for your reply!

Actually we are using 6.4. for production environment and there is no plan to upgrade the same.

We have some requirement to run test suite on this version and i'm using go version as mentioned in the doc and getting errors.

> ```
> # git branch
> * 6.4
> master
> # go version
> go version go1.10.3 linux/amd64
> 
> ```

**Error:**

> ```
> Step 15/31 : RUN /download.sh $DOWNLOAD_URL $ELASTIC_VERSION $CACHE_BUST && rm /download.sh
> ---> Running in e27cd3602fd4
> 
> Removing intermediate container e27cd3602fd4
> ERROR: Service 'elasticsearch' failed to build: The command '/bin/sh -c /download.sh $DOWNLOAD_URL $ELASTIC_VERSION $CACHE_BUST && rm /download.sh' returned a non-zero code: 28
> make[2]: *** [build-image] Error 1
> make[2]: Leaving directory `/usr/local/go/work/src/github.com/elastic/beats/libbeat'
> make[1]: *** [testsuite] Error 2
> make[1]: Leaving directory `/usr/local/go/work/src/github.com/elastic/beats/libbeat'
> make: *** [testsuite] Error 1
> 
> ```

Please help me to resolve this problem.

---

<div class="post-metadata">

**Author:** ![john5](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@john5](https://discuss.elastic.co/u/john5)\
**Post date:** [May 28, 2019, 6:36am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/5 "2019-05-28T06:36:25Z")

</div>

Hi @ruflin,

one more thing i observed related to this.

**In 6.4.1:** [https://github.com/elastic/beats/tree/v6.4.1/testing/environments/docker/elasticsearch](https://github.com/elastic/beats/tree/v6.4.1/testing/environments/docker/elasticsearch) as elasticsearch folder is available.  
**in 6.5.1:**  
[https://github.com/elastic/beats/tree/v6.5.1/testing/environments/docker](https://github.com/elastic/beats/tree/v6.5.1/testing/environments/docker) as elasticsearch folder is not available.

**Is there any specific reason to remove this in 6.5.x branch??**

---

<div class="post-metadata">

**Author:** ![john5](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@john5](https://discuss.elastic.co/u/john5)\
**Post date:** [May 29, 2019, 6:53am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/6 "2019-05-29T06:53:45Z")

</div>

Please help???

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [May 29, 2019, 7:40am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/7 "2019-05-29T07:40:36Z")

</div>

In 6.5 we switched over to the official docker images for testing which did not require us anymore to have all the correct setup.

Looking at the error it seems for some reason the docker image does not built. It fails on the download step so I assume some link got out of date. The download url is taken from here: [https://github.com/elastic/beats/blob/6.4/testing/environments/args.yml#L9](https://github.com/elastic/beats/blob/6.4/testing/environments/args.yml#L9) A SNAPSHOT was used for testing and SNAPSHOT are removed after a few days from the storage. That is probably the reason it does not work anymore. I would recommend you to adjust the args.yml file to use a released version, you must also adjust the DOWNLOAD\_URL part.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 26, 2019, 7:40am UTC](https://discuss.elastic.co/t/test-failure-error-beats/182638/8 "2019-06-26T07:40:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
