Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate bats tests to java #46005

Closed
6 of 7 tasks
rjernst opened this issue Aug 26, 2019 · 1 comment · Fixed by #60560
Closed
6 of 7 tasks

Migrate bats tests to java #46005

rjernst opened this issue Aug 26, 2019 · 1 comment · Fixed by #60560
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Meta Team:Delivery Meta label for Delivery team

Comments

@rjernst
Copy link
Member

rjernst commented Aug 26, 2019

The bats tests were the original packaging tests, allowing our distributions to be tested on each supported system through vagrant. However, the bats was difficult to write for, and is unmaintained. Writing bats tests was deprecated last year with the addition of the java packaging tests.

This is a meta issue to migrate the remaining bats tests to java. It is a spin off from #32143.

oss bats tests (qa/os/bats/oss):

  • 70_sysv_initd.bats - tests for installation with sysvinit

default distribution bats tests (qa/os/bats/default):

  • 10_basic.bats - smoke tests. everything in here except for testing bin/elasticsearch-croneval is already covered in ported tests
  • 20_tar_bootstrap_password.bats and 25_package_bootstrap_password.bats - tests we can set bootstrap.password and that sql-cli handles it - these should be combined into one test case
  • 30_tar_setup_password.bats and 35_package_setup_password.bats - tests bin/elasticsearch-setup-passwords - these should be combined into one test case
  • 40_tar_certgen.bats and 45_package_certgen.bats - tests for ssl certificates - these should be combined into one test case

plugin bats tests (qa/os/bats/plugins):

  • 25_tar_plugins.bats and 50_modules_and_plugins.bats - tests plugins can be installed, these are the same for tar vs. packages and should be combined into a single test case

upgrade bats tests (qa/os/bats/upgrade):

  • 80_upgrade.bats - tests that the package can be upgraded
@rjernst rjernst added :Delivery/Build Build or test infrastructure Meta labels Aug 26, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@alpar-t alpar-t added :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts and removed :Delivery/Build Build or test infrastructure labels Sep 5, 2019
rjernst added a commit to rjernst/elasticsearch that referenced this issue Nov 19, 2019
This commit moves the packaging tests for elasticsearch-setup-passwords
to java from bats. The change also enables future tests to enable
security in Elasticsearch and automatically have waitForElasticsearch
work correctly, at least to the same extent it worked in bats, by
waiting on the ES port instead of health check.

relates elastic#46005
rjernst added a commit that referenced this issue Nov 28, 2019
This commit moves the packaging tests for elasticsearch-setup-passwords
to java from bats. The change also enables future tests to enable
security in Elasticsearch and automatically have waitForElasticsearch
work correctly, at least to the same extent it worked in bats, by
waiting on the ES port instead of health check.

relates #46005
rjernst added a commit that referenced this issue Nov 28, 2019
This commit moves the packaging tests for elasticsearch-setup-passwords
to java from bats. The change also enables future tests to enable
security in Elasticsearch and automatically have waitForElasticsearch
work correctly, at least to the same extent it worked in bats, by
waiting on the ES port instead of health check.

relates #46005
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jan 10, 2020
This commit moves the packaging tests for elasticsearch-certgen
to java from bats. Although certgen is deprecated, the tests are
moved rather than just deleted, and the tests themselves should be
easily adaptable to certutil. One note is that the test is simplified to
use a single node, rather than the two node test from bats, which was
problematic given how the newer distro tests only operate with a single
distribution.

relates elastic#46005
rjernst added a commit that referenced this issue Jan 13, 2020
This commit moves the packaging tests for elasticsearch-certgen
to java from bats. Although certgen is deprecated, the tests are
moved rather than just deleted, and the tests themselves should be
easily adaptable to certutil. One note is that the test is simplified to
use a single node, rather than the two node test from bats, which was
problematic given how the newer distro tests only operate with a single
distribution.

relates #46005
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jan 13, 2020
This commit moves the packaging tests for elasticsearch-certgen
to java from bats. Although certgen is deprecated, the tests are
moved rather than just deleted, and the tests themselves should be
easily adaptable to certutil. One note is that the test is simplified to
use a single node, rather than the two node test from bats, which was
problematic given how the newer distro tests only operate with a single
distribution.

relates elastic#46005
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jan 13, 2020
This commit migrates the simple test of the cron eval tool from bats to
java packaging tests.

relates elastic#46005
rjernst added a commit that referenced this issue Jan 13, 2020
This commit moves the packaging tests for elasticsearch-certgen
to java from bats. Although certgen is deprecated, the tests are
moved rather than just deleted, and the tests themselves should be
easily adaptable to certutil. One note is that the test is simplified to
use a single node, rather than the two node test from bats, which was
problematic given how the newer distro tests only operate with a single
distribution.

relates #46005
rjernst added a commit that referenced this issue Jan 14, 2020
This commit migrates the simple test of the cron eval tool from bats to
java packaging tests.

relates #46005
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jan 14, 2020
This commit migrates the simple test of the cron eval tool from bats to
java packaging tests.

relates elastic#46005
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jan 15, 2020
This commit converts the sysv init tests from bats tests into the java
packaging tests. Since it is the last oss specific test, the bats oss
test task is also removed.

relates elastic#46005
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this issue Jan 23, 2020
This commit moves the packaging tests for elasticsearch-certgen
to java from bats. Although certgen is deprecated, the tests are
moved rather than just deleted, and the tests themselves should be
easily adaptable to certutil. One note is that the test is simplified to
use a single node, rather than the two node test from bats, which was
problematic given how the newer distro tests only operate with a single
distribution.

relates elastic#46005
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this issue Jan 23, 2020
This commit migrates the simple test of the cron eval tool from bats to
java packaging tests.

relates elastic#46005
rjernst added a commit that referenced this issue Jan 27, 2020
This commit converts the sysv init tests from bats tests into the java
packaging tests. Since it is the last oss specific test, the bats oss
test task is also removed.

relates #46005
rjernst added a commit that referenced this issue Jan 27, 2020
This commit migrates the simple test of the cron eval tool from bats to
java packaging tests.

relates #46005
rjernst added a commit to rjernst/elasticsearch that referenced this issue Jan 27, 2020
This commit converts the sysv init tests from bats tests into the java
packaging tests. Since it is the last oss specific test, the bats oss
test task is also removed.

relates elastic#46005
rjernst added a commit that referenced this issue Feb 10, 2020
This commit converts the sysv init tests from bats tests into the java
packaging tests. Since it is the last oss specific test, the bats oss
test task is also removed.

relates #46005
@rjernst rjernst added the Team:Core/Infra Meta label for core/infra team label May 4, 2020
rjernst added a commit to rjernst/elasticsearch that referenced this issue Aug 1, 2020
This commit removes the last of the bats tests, converting the rpm/deb
upgrade tests to java. It adds a new pattern of tasks, similar in nature
but separate from the existing distro tests, named `distroUpgradeTest`.
For each index compatible version, a `distroUpgradeTest.VERSION` task
exxists. Each distribution then has a task, named
`distroUpgradeTest.VERSION.DISTRO`.

One thing to note is these new tests do not cover no-jdk versions of
the rpm/deb packages, since the distribution/bwc project does not
currently build those.

closes elastic#59145
closes elastic#46005
rjernst added a commit that referenced this issue Aug 3, 2020
This commit removes the last of the bats tests, converting the rpm/deb
upgrade tests to java. It adds a new pattern of tasks, similar in nature
but separate from the existing distro tests, named `distroUpgradeTest`.
For each index compatible version, a `distroUpgradeTest.VERSION` task
exxists. Each distribution then has a task, named
`distroUpgradeTest.VERSION.DISTRO`.

One thing to note is these new tests do not cover no-jdk versions of
the rpm/deb packages, since the distribution/bwc project does not
currently build those.

closes #59145
closes #46005
rjernst added a commit to rjernst/elasticsearch that referenced this issue Aug 4, 2020
This commit removes the last of the bats tests, converting the rpm/deb
upgrade tests to java. It adds a new pattern of tasks, similar in nature
but separate from the existing distro tests, named `distroUpgradeTest`.
For each index compatible version, a `distroUpgradeTest.VERSION` task
exxists. Each distribution then has a task, named
`distroUpgradeTest.VERSION.DISTRO`.

One thing to note is these new tests do not cover no-jdk versions of
the rpm/deb packages, since the distribution/bwc project does not
currently build those.

closes elastic#59145
closes elastic#46005
rjernst added a commit that referenced this issue Aug 5, 2020
This commit removes the last of the bats tests, converting the rpm/deb
upgrade tests to java. It adds a new pattern of tasks, similar in nature
but separate from the existing distro tests, named `distroUpgradeTest`.
For each index compatible version, a `distroUpgradeTest.VERSION` task
exxists. Each distribution then has a task, named
`distroUpgradeTest.VERSION.DISTRO`.

One thing to note is these new tests do not cover no-jdk versions of
the rpm/deb packages, since the distribution/bwc project does not
currently build those.

closes #59145
closes #46005
rjernst added a commit that referenced this issue Aug 6, 2020
This commit removes the last of the bats tests, converting the rpm/deb
upgrade tests to java. It adds a new pattern of tasks, similar in nature
but separate from the existing distro tests, named `distroUpgradeTest`.
For each index compatible version, a `distroUpgradeTest.VERSION` task
exxists. Each distribution then has a task, named
`distroUpgradeTest.VERSION.DISTRO`.

One thing to note is these new tests do not cover no-jdk versions of
the rpm/deb packages, since the distribution/bwc project does not
currently build those.

closes #59145
closes #46005
@mark-vieira mark-vieira added Team:Delivery Meta label for Delivery team and removed Team:Core/Infra Meta label for core/infra team labels Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Meta Team:Delivery Meta label for Delivery team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants