.. _golang-plugin:
=============
Golang Plugin
=============
This optional plugin enables Avocado to list and run tests written using
the `Go programming language`_.
.. _Go programming language: https://golang.org/
To install the Golang plugin from pip, use::
$ sudo pip install avocado-framework-plugin-golang
If you're running Fedora, you can install the package ``golang-tests`` and run any of the tests
included there. You can try running the ``math`` or ``bufio`` tests like this::
$ GOPATH=/usr/lib/golang avocado list math
golang math:TestNaN
golang math:TestAcos
golang math:TestAcosh
golang math:TestAsin
... skip ...
And::
$ GOPATH=/usr/lib/golang avocado run math
JOB ID : 9453e09dc5a035e465de6abd570947909d6be228
JOB LOG : $HOME/avocado/job-results/job-2021-10-01T13.11-9453e09/job.log
(001/417) math:TestNaN: STARTED
(002/417) math:TestAcos: STARTED
(001/417) math:TestNaN: PASS (0.50 s)
(002/417) math:TestAcos: PASS (0.51 s)
(003/417) math:TestAcosh: STARTED
(004/417) math:TestAsin: STARTED
(003/417) math:TestAcosh: PASS (0.50 s)
(004/417) math:TestAsin: PASS (0.51 s)
(005/417) math:TestAsinh: STARTED
(006/417) math:TestAtan: STARTED
^C
RESULTS : PASS 4 | ERROR 0 | FAIL 0 | SKIP 413 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : $HOME/avocado/job-results/job-2021-10-01T13.11-9453e09/results.html
JOB TIME : 2.76 s
Another option is to try the countavocados examples provided with avocado.
Please fetch the avocado code where this example is included. ::
$ git clone https://github.com/avocado-framework/avocado.git
Also, disable the `Module-aware mode`_, this can be done with the GO111MODULE environment variable::
$ go env -w GO111MODULE=off
.. _Module-aware mode: https://golang.org/ref/mod#mod-commands
Then you can ``list`` and ``run`` the countavocados tests provided with the plugin::
$ GOPATH=$PWD/avocado/optional_plugins/golang/tests avocado -V list countavocados
Type Test Tag(s)
golang countavocados:TestEmptyContainers
golang countavocados:TestNoContainers
golang countavocados:ExampleContainers
Resolver Reference Info
avocado-instrumented countavocados File "countavocados" does not end with ".py"
exec-test countavocados File "countavocados" does not exist or is not a executable file
TEST TYPES SUMMARY
==================
golang: 3
And ::
$ GOPATH=$PWD/avocado/optional_plugins/golang/tests avocado run countavocados
JOB ID : c4284429a1ff97cd737b6e6fe1c5a83f91007317
JOB LOG : $HOME/avocado/job-results/job-2021-10-01T13.35-c428442/job.log
(1/3) countavocados:TestEmptyContainers: STARTED
(2/3) countavocados:TestNoContainers: STARTED
(1/3) countavocados:TestEmptyContainers: PASS (0.50 s)
(2/3) countavocados:TestNoContainers: PASS (0.50 s)
(3/3) countavocados:ExampleContainers: STARTED
(3/3) countavocados:ExampleContainers: PASS (0.50 s)
RESULTS : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : $HOME/avocado/job-results/job-2021-10-01T13.35-c428442/results.html
JOB TIME : 2.12 s
Raw data
{
"_id": null,
"home_page": "http://avocado-framework.github.io/",
"name": "avocado-framework-plugin-golang",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Avocado Developers",
"author_email": "avocado-devel@redhat.com",
"download_url": "https://files.pythonhosted.org/packages/25/ca/ba88cc188e6c387444120d2fa7f39269ab82ebe97de1cc692f935fef0e3c/avocado_framework_plugin_golang-105.0.tar.gz",
"platform": null,
"description": ".. _golang-plugin:\n\n=============\nGolang Plugin\n=============\n\nThis optional plugin enables Avocado to list and run tests written using\nthe `Go programming language`_.\n\n.. _Go programming language: https://golang.org/\n\nTo install the Golang plugin from pip, use::\n\n $ sudo pip install avocado-framework-plugin-golang\n\nIf you're running Fedora, you can install the package ``golang-tests`` and run any of the tests\nincluded there. You can try running the ``math`` or ``bufio`` tests like this::\n\n $ GOPATH=/usr/lib/golang avocado list math\n golang math:TestNaN\n golang math:TestAcos\n golang math:TestAcosh\n golang math:TestAsin\n ... skip ...\n\nAnd::\n\n $ GOPATH=/usr/lib/golang avocado run math\n JOB ID : 9453e09dc5a035e465de6abd570947909d6be228\n JOB LOG : $HOME/avocado/job-results/job-2021-10-01T13.11-9453e09/job.log\n (001/417) math:TestNaN: STARTED\n (002/417) math:TestAcos: STARTED\n (001/417) math:TestNaN: PASS (0.50 s)\n (002/417) math:TestAcos: PASS (0.51 s)\n (003/417) math:TestAcosh: STARTED\n (004/417) math:TestAsin: STARTED\n (003/417) math:TestAcosh: PASS (0.50 s)\n (004/417) math:TestAsin: PASS (0.51 s)\n (005/417) math:TestAsinh: STARTED\n (006/417) math:TestAtan: STARTED\n ^C\n RESULTS : PASS 4 | ERROR 0 | FAIL 0 | SKIP 413 | WARN 0 | INTERRUPT 0 | CANCEL 0\n JOB HTML : $HOME/avocado/job-results/job-2021-10-01T13.11-9453e09/results.html\n JOB TIME : 2.76 s\n\nAnother option is to try the countavocados examples provided with avocado.\nPlease fetch the avocado code where this example is included. ::\n\n $ git clone https://github.com/avocado-framework/avocado.git\n\nAlso, disable the `Module-aware mode`_, this can be done with the GO111MODULE environment variable::\n\n $ go env -w GO111MODULE=off\n\n.. _Module-aware mode: https://golang.org/ref/mod#mod-commands\n\nThen you can ``list`` and ``run`` the countavocados tests provided with the plugin::\n\n $ GOPATH=$PWD/avocado/optional_plugins/golang/tests avocado -V list countavocados\n Type Test Tag(s)\n golang countavocados:TestEmptyContainers\n golang countavocados:TestNoContainers\n golang countavocados:ExampleContainers\n\n Resolver Reference Info\n avocado-instrumented countavocados File \"countavocados\" does not end with \".py\"\n exec-test countavocados File \"countavocados\" does not exist or is not a executable file\n\n TEST TYPES SUMMARY\n ==================\n golang: 3\n\nAnd ::\n\n $ GOPATH=$PWD/avocado/optional_plugins/golang/tests avocado run countavocados\n JOB ID : c4284429a1ff97cd737b6e6fe1c5a83f91007317\n JOB LOG : $HOME/avocado/job-results/job-2021-10-01T13.35-c428442/job.log\n (1/3) countavocados:TestEmptyContainers: STARTED\n (2/3) countavocados:TestNoContainers: STARTED\n (1/3) countavocados:TestEmptyContainers: PASS (0.50 s)\n (2/3) countavocados:TestNoContainers: PASS (0.50 s)\n (3/3) countavocados:ExampleContainers: STARTED\n (3/3) countavocados:ExampleContainers: PASS (0.50 s)\n RESULTS : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0\n JOB HTML : $HOME/avocado/job-results/job-2021-10-01T13.35-c428442/results.html\n JOB TIME : 2.12 s\n",
"bugtrack_url": null,
"license": null,
"summary": "Avocado Plugin for Execution of Golang tests",
"version": "105.0",
"project_urls": {
"Homepage": "http://avocado-framework.github.io/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c10e2d86a1c91403e555f206f8202b6fc225d1da060c2b99e998344796f37f7e",
"md5": "8261c4c6993b7f6f182cd7cd32972d1b",
"sha256": "5317aaa2cc5c6afb8ed4a7db4716c204adb5d7cca58bb50cf42cfbeeb495e394"
},
"downloads": -1,
"filename": "avocado_framework_plugin_golang-105.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8261c4c6993b7f6f182cd7cd32972d1b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5375,
"upload_time": "2024-05-07T18:46:58",
"upload_time_iso_8601": "2024-05-07T18:46:58.539452Z",
"url": "https://files.pythonhosted.org/packages/c1/0e/2d86a1c91403e555f206f8202b6fc225d1da060c2b99e998344796f37f7e/avocado_framework_plugin_golang-105.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "25caba88cc188e6c387444120d2fa7f39269ab82ebe97de1cc692f935fef0e3c",
"md5": "72be4b6074f9f98a6779f8843cbb8653",
"sha256": "88c9950e69726af32fe7161a62df7aefd8ad7ea567094555aa4fe59c14893dec"
},
"downloads": -1,
"filename": "avocado_framework_plugin_golang-105.0.tar.gz",
"has_sig": false,
"md5_digest": "72be4b6074f9f98a6779f8843cbb8653",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5021,
"upload_time": "2024-05-07T18:47:26",
"upload_time_iso_8601": "2024-05-07T18:47:26.804977Z",
"url": "https://files.pythonhosted.org/packages/25/ca/ba88cc188e6c387444120d2fa7f39269ab82ebe97de1cc692f935fef0e3c/avocado_framework_plugin_golang-105.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-07 18:47:26",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "avocado-framework-plugin-golang"
}