Module tests.test_tagging
Functions
def generate_tag_name()
def generate_unordered_tag_names()
def test_tag_basic(client)
-
Test that applying Tags to Nodes/Disks and retrieving them work as expected. Ensures that Tags are properly validated when updated.
- Generate tags and apply to the disk and nodes
- Make sure the tags are applied
- Try to apply invalid tags to the disk and node. Action will fail.
def test_tag_scheduling(client, node_default_tags)
-
Test success scheduling with tags
Test prerequisites: - set Replica Node Level Soft Anti-Affinity enabled
Case 1: Don't specify any tags, replica should be scheduled to 3 disks.
Case 2: Use disk tags to select two nodes for all replicas.
Case 3: Use node tags to select two nodes for all replicas.
Case 4: Combine node and disk tags to schedule all replicas on one node.
def test_tag_scheduling_failure(client, node_default_tags)
-
Test that scheduling fails if no Nodes/Disks with the requested Tags are available.
Case 1: Validate that if specifying nonexist tags in volume, API call will fail.
Case 2:
- Specify existing but no node or disk can unsatisfied tags.
- Validate the volume will failed the scheduling
def test_tag_scheduling_on_update(client, node_default_tags, volume_name)
-
Test that Replicas get scheduled if a Node/Disk disks updated with the proper Tags.
Test prerequisites: - set Replica Node Level Soft Anti-Affinity enabled
- Create volume with tags that can not be satisfied
- Wait for volume to fail scheduling
- Update the node and disk with extra tags to satisfy the volume
- Verify now volume has been scheduled
- Attach the volume and check the replicas has been scheduled properly