apm-server icon indicating copy to clipboard operation
apm-server copied to clipboard

test: cleanup systemtest init

Open kruskall opened this issue 1 year ago • 3 comments

Motivation/summary

we don't need to upload apmpackage so we can cleanup the init code. Avoid cleaning es during init, it should be cleaned in specific tests to support the -count flag.

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

kruskall avatar Jan 17 '24 20:01 kruskall

This pull request does not have a backport label. Could you fix it @kruskall? 🙏 To fixup this pull request, you need to add the backport labels for the needed branches, such as:

  • backport-7.17 is the label to automatically backport to the 7.17 branch.
  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.

NOTE: backport-skip has been added to this pull request.

mergify[bot] avatar Jan 17 '24 20:01 mergify[bot]

run docs-build

v1v avatar Feb 09 '24 08:02 v1v

which -count flag are you referring to?

the builtin -count flag for go test

kruskall avatar Mar 25 '24 17:03 kruskall

@axw do we still need to install the APM package for systemtests ? Do you think this makes sense now that we have the apm data plugin ?

kruskall avatar Jun 12 '24 17:06 kruskall

@axw do we still need to install the APM package for systemtests ? Do you think this makes sense now that we have the apm data plugin ?

I don't think we need it any more. The tests pass... :) We're still using Fleet in ESS, and we have smoke tests there, so I think we're covered.

Avoid cleaning es during init, it should be cleaned in specific tests to support the -count flag.

I don't follow this. If the individual tests still clean up ES, how will -count work?

axw avatar Jun 13 '24 02:06 axw

Avoid cleaning es during init, it should be cleaned in specific tests to support the -count flag.

I don't follow this. If the individual tests still clean up ES, how will -count work?

Individual tests cleaning up ES is the correct behaviour. If we rely on TestMain then it will be cleaned once when the first test run and every other iteration specified in -count won't clean ES.

kruskall avatar Jun 13 '24 09:06 kruskall

Individual tests cleaning up ES is the correct behaviour. If we rely on TestMain then it will be cleaned once when the first test run and every other iteration specified in -count won't clean ES.

Gotcha. Makes sense.

axw avatar Jun 13 '24 23:06 axw