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

Enhancement/5832 deb rpm docker tests #6212

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
36e6688
enhancement(5832): added integration tests
kaanyalti Dec 4, 2024
1aa5a76
enhancement(5832): updated fixture install, updated assertions
kaanyalti Dec 4, 2024
a0ad3b7
enhancement(5832): added kubernetes test
kaanyalti Dec 4, 2024
65db4b6
enhancement(5832): ran mage update
kaanyalti Dec 4, 2024
2a096fe
enhancement(5832): execute rpm test in default group
kaanyalti Dec 5, 2024
519a353
Revert "enhancement(5832): execute rpm test in default group"
kaanyalti Dec 5, 2024
e5c26fc
enhancement(5832): debugging ci issues
kaanyalti Dec 14, 2024
a10335b
enahancement(5832): added logs to see if any other agent is running, …
kaanyalti Dec 16, 2024
8657083
enhancement(5832): added cleanup steps to rpm tests
kaanyalti Dec 17, 2024
1ef1a55
enhancement(5832): trying 777 permission
kaanyalti Dec 17, 2024
8b0f728
enhancement(5832): removed diagnostics, added rpm cleanup step that p…
kaanyalti Dec 18, 2024
973b01d
enhancement(5832): running all tests
kaanyalti Dec 19, 2024
445a2a6
enhancement(5832): uncommented integration test pipeline
kaanyalti Dec 19, 2024
f7fb263
enhancement(5832): reverting unnecessary changes
kaanyalti Dec 19, 2024
2097239
enhancement(5832): uncommenting integration tests
kaanyalti Dec 19, 2024
62e35b6
enhancement(5832): reverted integration_tests.sh changes
kaanyalti Dec 19, 2024
d38e468
enhancement(5832): reverted fixture_install.go changes
kaanyalti Dec 19, 2024
f29f380
enhancement(5832): remove print
kaanyalti Dec 19, 2024
978a940
enhancement(5832): logging output if cleanup fails
kaanyalti Dec 19, 2024
fc6ed16
enhancement(5832): updated k8s test, refactored upgrade test into tes…
kaanyalti Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enahancement(5832): added logs to see if any other agent is running, …
…commented out other integration tests
  • Loading branch information
kaanyalti committed Dec 20, 2024
commit a10335b6c9fad4ed95cf5bd548f5669a2198729d
230 changes: 115 additions & 115 deletions .buildkite/bk.integration.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,122 +21,122 @@ steps:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:0.5"
useCustomGlobalHooks: true

- group: "Stateful: Windows"
key: integration-tests-win
depends_on:
- integration-ess
steps:
- label: "Win2022:sudo:{{matrix}}"
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
.buildkite/scripts/integration-tests.ps1 {{matrix}} true
artifact_paths:
- build/**
- build/diagnostics/**
agents:
provider: "gcp"
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-windows-2022"
matrix:
- default
- fleet
- fleet-privileged
- upgrade

- label: "Win2022:non-sudo:{{matrix}}"
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
.buildkite/scripts/integration-tests.ps1 {{matrix}} false
artifact_paths:
- build/**
- build/diagnostics/**
agents:
provider: "gcp"
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-windows-2022"
matrix:
- default

- group: "Stateful:Ubuntu"
key: integration-tests-ubuntu
depends_on:
- integration-ess
steps:
- label: "x86_64:non-sudo: {{matrix}}"
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} false
artifact_paths:
- build/**
- build/diagnostics/**
agents:
provider: "gcp"
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2404"
matrix:
- default

- label: "x86_64:sudo: {{matrix}}"
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} true
artifact_paths:
- build/**
- build/diagnostics/**
agents:
provider: "gcp"
machineType: "n1-standard-8"
image: "family/platform-ingest-elastic-agent-ubuntu-2404"
matrix:
- default
- container
- fleet-upgrade-to-pr-build
- upgrade
- fleet
- fqdn
- deb
- fleet-airgapped
- fleet-privileged
- fleet-airgapped-privileged
# - group: "Stateful: Windows"
# key: integration-tests-win
# depends_on:
# - integration-ess
# steps:
# - label: "Win2022:sudo:{{matrix}}"
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
# .buildkite/scripts/integration-tests.ps1 {{matrix}} true
# artifact_paths:
# - build/**
# - build/diagnostics/**
# agents:
# provider: "gcp"
# machineType: "n1-standard-8"
# image: "family/platform-ingest-elastic-agent-windows-2022"
# matrix:
# - default
# - fleet
# - fleet-privileged
# - upgrade
#
# - label: "Win2022:non-sudo:{{matrix}}"
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
# .buildkite/scripts/integration-tests.ps1 {{matrix}} false
# artifact_paths:
# - build/**
# - build/diagnostics/**
# agents:
# provider: "gcp"
# machineType: "n1-standard-8"
# image: "family/platform-ingest-elastic-agent-windows-2022"
# matrix:
# - default

- label: "arm:sudo: {{matrix}}"
skip: true
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} true
artifact_paths:
- build/**
- build/diagnostics/**
agents:
provider: "aws"
imagePrefix: "platform-ingest-beats-ubuntu-2404-aarch64"
instanceType: "m6g.2xlarge"
matrix:
- default
- container
- fleet-upgrade-to-pr-build
- upgrade
- fleet
- fqdn
- deb
- fleet-airgapped
- fleet-privileged
- fleet-airgapped-privileged

- label: "arm:non-sudo: {{matrix}}"
skip: true
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} false
artifact_paths:
- build/**
- build/diagnostics/**
agents:
provider: "aws"
imagePrefix: "platform-ingest-beats-ubuntu-2404-aarch64"
instanceType: "m6g.xlarge"
matrix:
- default
# - group: "Stateful:Ubuntu"
# key: integration-tests-ubuntu
# depends_on:
# - integration-ess
# steps:
# - label: "x86_64:non-sudo: {{matrix}}"
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
# .buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} false
# artifact_paths:
# - build/**
# - build/diagnostics/**
# agents:
# provider: "gcp"
# machineType: "n1-standard-8"
# image: "family/platform-ingest-elastic-agent-ubuntu-2404"
# matrix:
# - default
#
# - label: "x86_64:sudo: {{matrix}}"
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
# .buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} true
# artifact_paths:
# - build/**
# - build/diagnostics/**
# agents:
# provider: "gcp"
# machineType: "n1-standard-8"
# image: "family/platform-ingest-elastic-agent-ubuntu-2404"
# matrix:
# - default
# - container
# - fleet-upgrade-to-pr-build
# - upgrade
# - fleet
# - fqdn
# - deb
# - fleet-airgapped
# - fleet-privileged
# - fleet-airgapped-privileged
#
# - label: "arm:sudo: {{matrix}}"
# skip: true
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
# .buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} true
# artifact_paths:
# - build/**
# - build/diagnostics/**
# agents:
# provider: "aws"
# imagePrefix: "platform-ingest-beats-ubuntu-2404-aarch64"
# instanceType: "m6g.2xlarge"
# matrix:
# - default
# - container
# - fleet-upgrade-to-pr-build
# - upgrade
# - fleet
# - fqdn
# - deb
# - fleet-airgapped
# - fleet-privileged
# - fleet-airgapped-privileged
#
# - label: "arm:non-sudo: {{matrix}}"
# skip: true
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build ${BUILDKITE_TRIGGERED_FROM_BUILD_ID}
# .buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} false
# artifact_paths:
# - build/**
# - build/diagnostics/**
# agents:
# provider: "aws"
# imagePrefix: "platform-ingest-beats-ubuntu-2404-aarch64"
# instanceType: "m6g.xlarge"
# matrix:
# - default

- group: "Stateful(Sudo):RHEL8"
key: integration-tests-rhel8
Expand Down
120 changes: 60 additions & 60 deletions .buildkite/integration.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,48 @@ steps:
provider: "gcp"
machineType: "n1-standard-8"

- label: "Serverless integration test"
key: "serverless-integration-tests"
depends_on:
- package-it
concurrency_group: elastic-agent-extended-testing/serverless-integration
concurrency: 8
env:
# we run each step in a different data center to spread the load
TEST_INTEG_AUTH_GCP_DATACENTER: "us-central1-a"
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests.sh serverless integration:single TestLogIngestionFleetManaged #right now, run a single test in serverless mode as a sort of smoke test, instead of re-running the entire suite
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
agents:
provider: "gcp"
machineType: "n1-standard-8"
notify:
- github_commit_status:
context: "buildkite/elastic-agent-extended-testing - Serverless integration test"
# - label: "Serverless integration test"
# key: "serverless-integration-tests"
# depends_on:
# - package-it
# concurrency_group: elastic-agent-extended-testing/serverless-integration
# concurrency: 8
# env:
# # we run each step in a different data center to spread the load
# TEST_INTEG_AUTH_GCP_DATACENTER: "us-central1-a"
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it'
# .buildkite/scripts/steps/integration_tests.sh serverless integration:single TestLogIngestionFleetManaged #right now, run a single test in serverless mode as a sort of smoke test, instead of re-running the entire suite
# artifact_paths:
# - "build/TEST-**"
# - "build/diagnostics/*"
# agents:
# provider: "gcp"
# machineType: "n1-standard-8"
# notify:
# - github_commit_status:
# context: "buildkite/elastic-agent-extended-testing - Serverless integration test"

- label: "Extended runtime leak tests"
key: "extended-integration-tests"
depends_on:
- package-it
concurrency_group: elastic-agent-extended-testing/leak-tests
concurrency: 8
env:
TEST_INTEG_AUTH_GCP_DATACENTER: "us-central1-b"
command: |
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests.sh stateful integration:TestForResourceLeaks
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
agents:
provider: "gcp"
machineType: "n1-standard-8"
notify:
- github_commit_status:
context: "buildkite/elastic-agent-extended-testing - Extended runtime leak tests"
# - label: "Extended runtime leak tests"
# key: "extended-integration-tests"
# depends_on:
# - package-it
# concurrency_group: elastic-agent-extended-testing/leak-tests
# concurrency: 8
# env:
# TEST_INTEG_AUTH_GCP_DATACENTER: "us-central1-b"
# command: |
# buildkite-agent artifact download build/distributions/** . --step 'package-it'
# .buildkite/scripts/steps/integration_tests.sh stateful integration:TestForResourceLeaks
# artifact_paths:
# - "build/TEST-**"
# - "build/diagnostics/*"
# agents:
# provider: "gcp"
# machineType: "n1-standard-8"
# notify:
# - github_commit_status:
# context: "buildkite/elastic-agent-extended-testing - Extended runtime leak tests"

- label: "Triggering Integration tests"
depends_on:
Expand Down Expand Up @@ -83,22 +83,22 @@ steps:
- github_commit_status:
context: "buildkite/elastic-agent-extended-testing - Serverless Beats Tests"

- label: "Kubernetes Integration tests"
key: "k8s-integration-tests"
env:
K8S_VERSION: "v1.31.0"
KIND_VERSION: "v0.24.0"
command: ".buildkite/scripts/steps/k8s-extended-tests.sh"
artifact_paths:
- "build/k8s-logs*/*"
- "build/k8s-logs*/**/*"
- "build/TEST-**"
- "build/diagnostics/*"
agents:
provider: "gcp"
machineType: "c2-standard-16"
image: "family/core-ubuntu-2204"
diskSizeGb: 400
notify:
- github_commit_status:
context: "buildkite/elastic-agent-extended-testing - Kubernetes Integration tests"
# - label: "Kubernetes Integration tests"
# key: "k8s-integration-tests"
# env:
# K8S_VERSION: "v1.31.0"
# KIND_VERSION: "v0.24.0"
# command: ".buildkite/scripts/steps/k8s-extended-tests.sh"
# artifact_paths:
# - "build/k8s-logs*/*"
# - "build/k8s-logs*/**/*"
# - "build/TEST-**"
# - "build/diagnostics/*"
# agents:
# provider: "gcp"
# machineType: "c2-standard-16"
# image: "family/core-ubuntu-2204"
# diskSizeGb: 400
# notify:
# - github_commit_status:
# context: "buildkite/elastic-agent-extended-testing - Kubernetes Integration tests"
2 changes: 2 additions & 0 deletions pkg/testing/fixture_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func (f *Fixture) installFunc(ctx context.Context, installOpts *InstallOpts, sho

// check for running agents before installing, but only if not installed into a namespace whose point is allowing two agents at once.
if installOpts != nil && !installOpts.Develop && installOpts.Namespace == "" {
fmt.Println("TESTING IF ANY OTHER AGENTS ARE RUNNING ", getElasticAgentProcesses(f.t))
assert.Empty(f.t, getElasticAgentProcesses(f.t), "there should be no running agent at beginning of Install()")
}

Expand Down Expand Up @@ -553,6 +554,7 @@ func (f *Fixture) installRpm(ctx context.Context, installOpts *InstallOpts, shou
return out, fmt.Errorf("systemctl start elastic-agent failed: %w", err)
}

fmt.Println("SHOULD ENROLL ", shouldEnroll)
if !shouldEnroll {
return nil, nil
}
Expand Down