Skip to content

Comments

test(e2e): extract and extend storage tests into dedicated test suite#1321

Open
tallaxes wants to merge 12 commits intomainfrom
tallaxes/e2e/storage
Open

test(e2e): extract and extend storage tests into dedicated test suite#1321
tallaxes wants to merge 12 commits intomainfrom
tallaxes/e2e/storage

Conversation

@tallaxes
Copy link
Collaborator

@tallaxes tallaxes commented Dec 26, 2025

Description

Extracts storage-related E2E tests from the Integration test suite into a dedicated Storage test suite, and extends it with additional test cases for better coverage.

Changes:

  • Created new test/suites/storage/suite_test.go containing all storage tests
  • Removed test/suites/integration/storage_test.go
  • Added "Storage" to the E2E test matrix in .github/workflows/e2e-matrix.yaml
  • Added GetAvailableZones() and SupportsZones() methods to the test environment
  • Extended the zone provider with GetAvailableZones() method to return the list of available zones for a region

The new Storage test suite includes:

  • Persistent Volumes (Static): Pre-bound PV tests with various storage class configurations and topology constraints
  • Persistent Volumes (Dynamic): Azure Disk CSI driver tests with dynamic provisioning and allowed topologies
  • Stateful workloads: StatefulSet disruption and volume detachment tests
  • Ephemeral Storage: emptyDir and memory-backed emptyDir tests

How was this change tested?

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

@tallaxes tallaxes added area/storage Issues or PRs related to storage area/e2e-testing labels Dec 26, 2025
@tallaxes tallaxes self-assigned this Dec 26, 2025
@rakechill rakechill self-assigned this Jan 13, 2026
// Cached zone support data - maps region name to zone support boolean
// Cached zone support data - maps region name to zone support boolean.
// Kept separate from zoneList because fallbackZonalRegions only has boolean data,
// allowing SupportsZones() to work even when the API fails and zoneList is empty.
Copy link
Collaborator

@comtalyst comtalyst Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a possibility that this happen? The code below make it looks like both will come from the same API, though not sure if there are more behind the scenes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the point is that we only hardcode the boolean collection (via fallbackZonalRegions) rather than the full list of zones which is what is being added here.

It is a bit weird though, I wonder if it would be better if we just hardcoded the full zonal list rather than a boolean collection and then we could avoid having a collection of booleans + a collection of list of zones. We could possibly update the fallback zonal regions to be read from a file we code-generate via calling the az cli + script (similar to other things) and then use embed or similar to embed that data into the application?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also mean that GetAvailableZones had the same fallback behavior as SupportsZones, which would be nice.

// We expect the stateful workload to become healthy on new node before the 6-minute force detach timeout.
// We start timer after pod binds to node because volume attachment happens during ContainerCreating
env.EventuallyExpectCreatedNodeClaimCount("==", 1)
env.EventuallyExpectCreatedNodeCount(">=", 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check for create node >= 1 this occasionally?
If we don't reset, or check whether there is no new node created, just once isenough?

@tallaxes tallaxes added the area/test Issues or PRs related to testing label Jan 21, 2026
// Cached zone support data - maps region name to zone support boolean
// Cached zone support data - maps region name to zone support boolean.
// Kept separate from zoneList because fallbackZonalRegions only has boolean data,
// allowing SupportsZones() to work even when the API fails and zoneList is empty.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the point is that we only hardcode the boolean collection (via fallbackZonalRegions) rather than the full list of zones which is what is being added here.

It is a bit weird though, I wonder if it would be better if we just hardcoded the full zonal list rather than a boolean collection and then we could avoid having a collection of booleans + a collection of list of zones. We could possibly update the fallback zonal regions to be read from a file we code-generate via calling the az cli + script (similar to other things) and then use embed or similar to embed that data into the application?

// Cached zone support data - maps region name to zone support boolean
// Cached zone support data - maps region name to zone support boolean.
// Kept separate from zoneList because fallbackZonalRegions only has boolean data,
// allowing SupportsZones() to work even when the API fails and zoneList is empty.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also mean that GetAvailableZones had the same fallback behavior as SupportsZones, which would be nice.


// ensureLoaded attempts to load zone data from Azure API if not already loaded.
// Must be called with p.mu held.
func (p *Provider) ensureLoaded(ctx context.Context) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: You could call this ensureLoadedLocked (which is a slightly funky name) to make it more clear the expectation that this must be called w/ the lock held

@rakechill rakechill removed their assignment Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage Issues or PRs related to storage area/test Issues or PRs related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants