Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Shastick committed Mar 20, 2024
1 parent b887ee1 commit 0de75f1
Show file tree
Hide file tree
Showing 10 changed files with 303 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import datetime
from typing import List, Optional, Self

Expand Down Expand Up @@ -72,3 +74,19 @@ def to_upsert_subscription_params(
min_alt_m=self.min_alt_m,
max_alt_m=self.max_alt_m,
)

def shift_time(self, shift: datetime.timedelta) -> SubscriptionParams:
"""
Returns a new SubscriptionParams object with the start and end times shifted by the given timedelta.
"""
return SubscriptionParams(
sub_id=self.sub_id,
area_vertices=self.area_vertices,
min_alt_m=self.min_alt_m,
max_alt_m=self.max_alt_m,
start_time=self.start_time + shift,
end_time=self.end_time + shift,
base_url=self.base_url,
notify_for_op_intents=self.notify_for_op_intents,
notify_for_constraints=self.notify_for_constraints,
)
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ Verify that the subscription returned by every DSS is correctly formatted and co

Verify that the version of the subscription returned by every DSS is as expected.

### Mutate subscription test step
### Mutate subscription broadcast test step

This test step mutates the previously created subscription to verify that the DSS reacts properly: notably, it checks that the subscription version is updated,
including for changes that are not directly visible, such as changing the subscription's footprint.
This test step mutates the previously created subscription, by accessing the primary DSS, to verify that the update is propagated to all other DSSes.
Notably, it checks that the subscription version is updated, including for changes that are not directly visible, such as changing the subscription's footprint.

#### [Update subscription](../fragments/sub/crud/update.md)

Expand Down Expand Up @@ -122,9 +122,51 @@ Verify that the subscription returned by every DSS is correctly formatted and co

Verify that the version of the subscription returned by every DSS is as expected.

### Delete subscription test step
### Mutate subscription on secondaries test step

Attempt to delete the subscription in various ways and ensure that the DSS reacts properly.
This test step attempts to mutate the subscription on every secondary DSS instance (that is, instances through which the subscription has not been created) to confirm that such mutations are properly propagated to every DSS.

#### 🛑 Subscription can be mutated on secondary DSS check

If the secondary DSS does not allow the subscription to be mutated, either the secondary DSS or the primary DSS are in violation of one or both of the following requirements:

**[astm.f3548.v21.DSS0210,1b](../../../../../requirements/astm/f3548/v21.md)**, if the `manager` of the subscription fails to be taken into account (either because the primary DSS did not propagated it, or because the secondary failed to consider it);
**[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**, if the secondary DSS fails to properly implement the API to mutate subscriptions.

#### 🛑 Subscription returned by a secondary DSS is valid and correct check

When queried for a subscription that was created via another DSS, a DSS instance is expected to provide a valid subscription.

If it does not, it might be in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.

#### [Update subscription](../fragments/sub/crud/update.md)

Confirm that the secondary DSS handles the update properly.

#### [Subscription is synchronized](../fragments/sub/sync.md)

Confirm that the subscription that was just mutated is properly synchronized across all DSS instances.

#### [Get subscription](../fragments/sub/crud/read.md)

Confirms that the subscription that was just mutated can be retrieved from any DSS, and that it has the expected content.

#### [Validate subscription](../fragments/sub/validate/correctness.md)

Verify that the subscription returned by the DSS is properly formatted and contains the correct content.

#### [Validate version is updated by mutation](../fragments/sub/validate/mutated.md)

Verify that the version of the subscription returned by the DSS the subscription was mutated through has been updated.

#### [Validate new version is synced](../fragments/sub/validate/non_mutated.md)

Verify that the new version of the subscription has been propagated.

### Delete subscription on primary test step

Attempt to delete the subscription that was created on the primary DSS through the primary DSS in various ways,
and ensure that the DSS reacts properly.

This also checks that the subscription data returned by a successful deletion is correct.

Expand All @@ -144,7 +186,33 @@ Verify that the version of the subscription returned by the DSS is as expected

Attempt to query and search for the deleted subscription in various ways

#### 🛑 Secondary DSS should not return the deleted subscription check
#### 🛑 DSS should not return the deleted subscription check

If a DSS returns a subscription that was previously successfully deleted from the primary DSS,
either one of the primary DSS or the DSS that returned the subscription is in violation of one of the following requirements:

**[astm.f3548.v21.DSS0210,1a](../../../../../requirements/astm/f3548/v21.md)**, if the API is not working as described by the OpenAPI specification;
**[astm.f3548.v21.DSS0215](../../../../../requirements/astm/f3548/v21.md)**, if the DSS through which the subscription was deleted is returning API calls to the client before having updated its underlying distributed storage.

As a result, the DSS pool under test is failing to meet **[astm.f3548.v21.DSS0020](../../../../../requirements/astm/f3548/v21.md)**.

### Delete subscriptions on secondaries test step

Attempt to delete subscriptions that were created through the primary DSS via the secondary DSS instances.

#### [Delete subscription](../fragments/sub/crud/delete.md)

Confirms that a subscription can be deleted from a secondary DSS

#### [Validate subscription](../fragments/sub/validate/correctness.md)

Verify that the subscription returned by the DSS via the deletion is properly formatted and contains the correct content.

#### [Validate version](../fragments/sub/validate/non_mutated.md)

Verify that the version of the subscription returned by the DSS is as expected

#### 🛑 DSS should not return the deleted subscription check

If a DSS returns a subscription that was previously successfully deleted from the primary DSS,
either one of the primary DSS or the DSS that returned the subscription is in violation of one of the following requirements:
Expand Down
Loading

0 comments on commit 0de75f1

Please sign in to comment.