mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #8268 from mirelachirica/fix_gt_set_credentials
Cellular: Fix greentea network set credentials test casepull/7948/head
commit
bff4f4be6c
|
@ -210,10 +210,13 @@ static void test_connect()
|
||||||
|
|
||||||
static void test_credentials()
|
static void test_credentials()
|
||||||
{
|
{
|
||||||
TEST_ASSERT(nw->set_credentials(NULL, "username", "pass") == NSAPI_ERROR_OK);
|
nsapi_error_t err = nw->set_credentials(NULL, "username", "pass");
|
||||||
|
TEST_ASSERT(err == NSAPI_ERROR_OK || err == NSAPI_ERROR_UNSUPPORTED);
|
||||||
|
err = nw->set_credentials("internet", "user", NULL);
|
||||||
|
TEST_ASSERT(err == NSAPI_ERROR_OK || err == NSAPI_ERROR_UNSUPPORTED);
|
||||||
|
err = nw->set_credentials("internet", CellularNetwork::NOAUTH, "user", "pass");
|
||||||
|
TEST_ASSERT(err == NSAPI_ERROR_OK || err == NSAPI_ERROR_UNSUPPORTED);
|
||||||
TEST_ASSERT(nw->set_credentials("internet", NULL, "pass") == NSAPI_ERROR_OK);
|
TEST_ASSERT(nw->set_credentials("internet", NULL, "pass") == NSAPI_ERROR_OK);
|
||||||
TEST_ASSERT(nw->set_credentials("internet", "user", NULL) == NSAPI_ERROR_OK);
|
|
||||||
TEST_ASSERT(nw->set_credentials("internet", CellularNetwork::NOAUTH, "user", "pass") == NSAPI_ERROR_OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_other()
|
static void test_other()
|
||||||
|
|
Loading…
Reference in New Issue