Conversation
|
This is copying a significant amount of code from https://github.com/gophercloud/gophercloud/tree/main/internal/acceptance. I am going to create a ticket there about potentially trying to expose this code out instead of copying it. |
6a71182 to
1b6d7ae
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces comprehensive integration tests for the OpenStack exporter, enabling automated testing against live OpenStack services (Ironic, Nova, Neutron, Glance, Keystone, Placement) via DevStack in CI. The tests validate that the exporter correctly generates Prometheus metrics from real OpenStack resources.
Key Changes
- Added integration test infrastructure with helper packages for creating test resources and clients
- Created service-specific integration test suites (baremetal, compute, networking, images, identity, placement)
- Set up GitHub Actions workflows to run integration tests on pull requests using DevStack
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| script/stackenv | Bash script to prepare DevStack testing environment with required resources and environment variables |
| script/integration-suites/* | Individual test runner scripts for each OpenStack service integration test suite |
| script/collectlogs | Utility script to collect diagnostic logs after integration test failures |
| integration/utils.go | Core integration test utilities for starting the OpenStack exporter |
| integration/tools/tools.go | Helper functions for waiting, random generation, and resource printing in tests |
| integration/tools/pkg.go | Build tags and package documentation for test tools |
| integration/funcs/compute.go | Helper functions for creating and managing compute resources in tests |
| integration/funcs/baremetal.go | Helper functions for creating and managing baremetal nodes in tests |
| integration/funcs/pkg.go | Build tags and package documentation for test resource functions |
| integration/clients/clients.go | OpenStack service client creation functions for various services |
| integration/clients/conditions.go | Test skip conditions for different OpenStack configurations and features |
| integration/clients/http.go | HTTP round tripper with request/response logging and header redaction |
| integration/*_test.go | Integration test files validating exporter metrics for each OpenStack service |
| .github/workflows/integration-*.yaml | GitHub Actions workflows for running integration tests in CI |
| .github/workflows/ci.yaml | Updated to exclude integration tests from unit test runs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CI Fixes Fixing more lint errors Tried to make tests more specific Fixed issues Fixes Fixes More fixes Trying more Test Fix Testing Testing Changes Removing placement Trying things out More changes Testing Trying things Fixes Fixes chore(deps): bump actions/checkout from 4 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Update integration/funcs/compute.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update script/stackenv Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> chore(deps): bump reviewdog/action-actionlint from 1.66.1 to 1.69.0 Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.66.1 to 1.69.0. - [Release notes](https://github.com/reviewdog/action-actionlint/releases) - [Commits](reviewdog/action-actionlint@e37e2ca...437bbe9) --- updated-dependencies: - dependency-name: reviewdog/action-actionlint dependency-version: 1.69.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
7a9117f to
35eba72
Compare
|
|
I think the main thing to not is BASIS_OPS for ironic is false. For some reason, this makes the tests pass, where they didn't before |
|
@vooon - I'd appreciate your feedback on this in any capacity |
|
@vooon appreciate this. Thank you! |
ClifHouck
left a comment
There was a problem hiding this comment.
I mostly skimmed this. It looks fine on the surface, you can always disable it later or correct things if there's flakiness.
| // The instance will be launched on the network specified in OS_NETWORK_NAME. | ||
| // An error will be returned if the instance was unable to be created. | ||
| func CreateServer(t *testing.T, client *gophercloud.ServiceClient) (*servers.Server, error) { | ||
| choices, err := clients.AcceptanceTestChoicesFromEnv() |
There was a problem hiding this comment.
Do these choices get logged somewhere?
There was a problem hiding this comment.
It gets defined here. I took this code directly from gophercloud. I do want them to export it publicly but that is in the works (gophercloud/gophercloud#3501)
I can log if you would like
This should help make trusting new changes easier.