-
Notifications
You must be signed in to change notification settings - Fork 3k
Greentea wifi test cases - disconnect done as teardown after each connect #5743
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
Greentea wifi test cases - disconnect done as teardown after each connect #5743
Conversation
Call disconnect when connect has been tested. Also instead of waiting for parameter error in case of missing SSID give missing SSID error code.
…hannel It's possible that a device does not support setting the channel to be used. In case channel is not set by the device lets disable the check.
@SeppoTakalo and @jarlamsa, please review |
TESTS/network/wifi/wifi_scan.cpp
Outdated
@@ -54,12 +54,16 @@ void wifi_scan(void) | |||
if (strcmp(MBED_CONF_APP_WIFI_SECURE_SSID, ssid) == 0) { | |||
secure_found = true; | |||
TEST_ASSERT_EQUAL_INT(NSAPI_SECURITY_WPA2, security); |
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.
Should this be changed also to WPA/WPA2?
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.
Yes, it should and I'll change it.
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.
Security to check against should be defined in the .json which also defines the wlan ap to connect to.
Partially dublicate of this: #5723 The disconnect phase is added there. |
…ly from get_interface-function
/morph build |
Build : SUCCESSBuild number : 750 Triggering tests/morph test |
@@ -28,6 +28,5 @@ void wifi_connect_nocredentials(void) | |||
WiFiInterface *wifi = get_interface(); | |||
nsapi_error_t error; | |||
error = wifi->connect(); | |||
wifi->disconnect(); | |||
TEST_ASSERT(error == NSAPI_ERROR_PARAMETER); | |||
TEST_ASSERT(error == NSAPI_ERROR_NO_SSID); |
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.
Should we also accept the NSAPI_ERROR_PARAMETER
I'm not sure that all drivers currently return this NO_SSID.
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'll add it.
Exporter Build : SUCCESSBuild number : 403 |
Test : SUCCESSBuild number : 575 |
/morph build |
Build : SUCCESSBuild number : 759 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 412 |
Test : SUCCESSBuild number : 590 |
Description
Assumed behavior of the drivers is that when connect method is called the modem is not in connected state. In other words when a test case executes connect successfully the next case assumes that disconnect has also been called.
If AP is not found instead of expecting NSAPI_ERROR_PARAMETER we are expecting NSAPI_ERROR_NO_SSID from now on.
NSAPI_SECURITY_WPA_WPA2 used in WIFI_CONNECT_SECURE from now on.
Don't check against assumed channel if user configures channel number as 0. This is helpful if a driver does not support setting the channel.
Status
READY
Migrations
NO
Steps to test or reproduce