-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feat network steps #173
base: main
Are you sure you want to change the base?
Feat network steps #173
Conversation
...testing-platform-api/src/main/java/com/aws/greengrass/testing/platform/PlatformResolver.java
Outdated
Show resolved
Hide resolved
aws-greengrass-testing-platform/aws-greengrass-testing-platform-api/pom.xml
Outdated
Show resolved
Hide resolved
aws-greengrass-testing-platform/aws-greengrass-testing-platform-api/pom.xml
Outdated
Show resolved
Hide resolved
eccbd3a
to
7ccc866
Compare
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommanConnectivitySteps.java
Outdated
Show resolved
Hide resolved
@@ -124,7 +124,7 @@ | |||
<dependency> | |||
<groupId>com.google.guava</groupId> | |||
<artifactId>guava</artifactId> | |||
<version>31.1-jre</version> | |||
<version>23.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm I don't know why this shows up as changed but we have to make sure this has the previous value. We don't want to update this dependencies if it is not needed.
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommanConnectivitySteps.java
Outdated
Show resolved
Hide resolved
@@ -194,11 +194,6 @@ | |||
<version>${auto.service.version}</version> | |||
<scope>provided</scope> | |||
</dependency> | |||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this dependency removed?
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommonConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...ting-platform-api/src/main/java/com/aws/greengrass/testing/platform/linux/LinuxPlatform.java
Outdated
Show resolved
Hide resolved
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommanConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommonConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommanConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommonConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommanConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommonConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...-features-api/src/main/java/com/aws/greengrass/testing/features/CommonConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
...-platform-api/src/main/java/com/aws/greengrass/testing/platform/linux/NetworkUtilsLinux.java
Show resolved
Hide resolved
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
<artifactId>utils</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.inject</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dependency is not needed here
*/ | ||
@When("the device network connectivity is {word}") | ||
public void setDeviceNetwork(final String connectivity) throws IOException, InterruptedException { | ||
switch (connectivity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the device network connectivity is OFFLINE
is considered as a wrong input here. Do we want that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe so, there are only 2 branches
throw new UnsupportedOperationException("Connectivity " + connectivity + " is not supported"); | ||
} | ||
|
||
offline = connectivity.equalsIgnoreCase("offline"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, this can throw null pointer exception if connectivity
is null . Just reverse the check here - "offline".equalsIgnoreCase(connectivity).
Also, this can be moved to L40 where you can directly update offline to true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great call out. I like the reversing of order to avoid the NPE. I would suggest not moving it to L40. There are scenarios where the client might go offline, then online and we want to flip the flag to avoid triggering the recover step on teardown
throw new UnsupportedOperationException("Connectivity " + connectivity + " is not supported"); | ||
} | ||
|
||
"offline".equalsIgnoreCase(connectivity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
...esting-features-api/src/main/java/com/aws/greengrass/testing/features/ConnectivitySteps.java
Outdated
Show resolved
Hide resolved
UAT Test Passing: https://github.com/aws-greengrass/aws-greengrass-testing/actions/runs/3690242190/jobs/6247046788 on |
Description of changes:
Port over common connectivity steps from EF to OTF, which are used by several tests that are being ported into repositories using OTF as a dependency
Why is this change necessary:
Without it we can not simulate scenarios were the network connection is lost.
How was this change tested:
Built OTF locally and used the step on a test that is being ported for the log manager.