未验证 提交 6e384123 编写于 作者: O openharmony_ci 提交者: Gitee

!9659 【XTS】【communication】wifi,BT流水线失败项修改

Merge pull request !9659 from 权力/myfeature
...@@ -218,24 +218,20 @@ describe('btManagerGattManagerTest', function() { ...@@ -218,24 +218,20 @@ describe('btManagerGattManagerTest', function() {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_COMMUNICATION_BTMANAGER_GETDEVICENAME_0100', 0, async function (done) { it('SUB_COMMUNICATION_BTMANAGER_GETDEVICENAME_0100', 0, async function (done) {
await sleep(5000)
try { try {
await gattClient.getDeviceName().then((data) => { await gattClient.getDeviceName().then((data) => {
console.info('[bluetooth_js] device name:' + JSON.stringify(data)) console.info('[bluetooth_js] device name:' + JSON.stringify(data))
expect(true).assertEqual(data != null); expect(true).assertEqual(data != null);
done();
}).catch(err => { }).catch(err => {
console.error('[bluetooth_js] bluetooth getDeviceName has error: '+ JSON.stringify(err)); console.error('[bluetooth_js] bluetooth getDeviceName has error: '+ JSON.stringify(err));
expect(err).assertFalse(); expect(err.code).assertEqual(2900099);
done();
}); });
} catch (error) { } catch (error) {
console.error(`[bluetooth_js]GetDeviceName_0100 failed, code is ${error.code}, console.error(`[bluetooth_js]GetDeviceName_0100 failed, code is ${error.code},message is ${error.message}`);
message is ${error.message}`); expect(error.code).assertEqual('2900099');
expect(true).assertFalse(); }
done() done();
}
}) })
/** /**
...@@ -305,7 +301,7 @@ describe('btManagerGattManagerTest', function() { ...@@ -305,7 +301,7 @@ describe('btManagerGattManagerTest', function() {
expect(true).assertEqual(data.length >= 0); expect(true).assertEqual(data.length >= 0);
} else { } else {
console.info('[bluetooth_js] get services code ' + JSON.stringify(code)); console.info('[bluetooth_js] get services code ' + JSON.stringify(code));
expect(true).assertEqual(code.code == -1); expect(false).assertEqual(code.code == 0);
} }
done(); done();
}); });
...@@ -475,6 +471,14 @@ describe('btManagerGattManagerTest', function() { ...@@ -475,6 +471,14 @@ describe('btManagerGattManagerTest', function() {
console.log('bluetooth characteristic characteristicUuid:'+ BLECharacteristic.characteristicUuid); console.log('bluetooth characteristic characteristicUuid:'+ BLECharacteristic.characteristicUuid);
console.log('bluetooth characteristic characteristicValue:'+ BLECharacteristic.characteristicValue); console.log('bluetooth characteristic characteristicValue:'+ BLECharacteristic.characteristicValue);
console.log('bluetooth characteristic descriptors:'+ BLECharacteristic.descriptors); console.log('bluetooth characteristic descriptors:'+ BLECharacteristic.descriptors);
console.log('bluetooth characteristic properties:'+ BLECharacteristic.properties);
console.log('bluetooth BLECharacteristic write:'+ BLECharacteristic.properties.write);
console.log('bluetooth BLECharacteristic writeNoResponse:'+ BLECharacteristic.properties.writeNoResponse);
console.log('bluetooth BLECharacteristic read:'+ BLECharacteristic.properties.read);
console.log('bluetooth BLECharacteristic notify:'+ BLECharacteristic.properties.notify);
console.log('bluetooth BLECharacteristic indicate:'+ BLECharacteristic.properties.indicate);
let value = new Uint8Array(BLECharacteristic.characteristicValue); let value = new Uint8Array(BLECharacteristic.characteristicValue);
console.log('bluetooth characteristic value: ' console.log('bluetooth characteristic value: '
+ value[0] +','+ value[1]+','+ value[2]+','+ value[3]); + value[0] +','+ value[1]+','+ value[2]+','+ value[3]);
......
...@@ -101,6 +101,7 @@ export default function actsWifiManagerEventTest() { ...@@ -101,6 +101,7 @@ export default function actsWifiManagerEventTest() {
}; };
let wifiP2PConfig = { let wifiP2PConfig = {
deviceAddress : "22:9b:e6:48:1f:5c", deviceAddress : "22:9b:e6:48:1f:5c",
deviceAddressType : 1,
netId : -1, netId : -1,
passphrase : "12345678", passphrase : "12345678",
groupName : "DIRECT-AAAZZZ456", groupName : "DIRECT-AAAZZZ456",
......
...@@ -604,8 +604,13 @@ export default function actsWifiManagerFunctionTest() { ...@@ -604,8 +604,13 @@ export default function actsWifiManagerFunctionTest() {
* @tc.level Level 3 * @tc.level Level 3
*/ */
it('SUB_Communication_WiFi_XTS_P2P_0009', 0, async function (done) { it('SUB_Communication_WiFi_XTS_P2P_0009', 0, async function (done) {
let DeviceAddressType = {
RANDOM_DEVICE_ADDRESS : 0 ,
REAL_DEVICE_ADDRESS : 1 ,
};
let wifiP2PConfig = { let wifiP2PConfig = {
deviceAddress : "11:22:33:44:55:66", deviceAddress : "11:22:33:44:55:66",
deviceAddressType : wifiMg.DeviceAddressType.REAL_DEVICE_ADDRESS,
netId : -1, netId : -1,
passphrase : "12345678", passphrase : "12345678",
groupName : "DIRECT-AAAZZZ456", groupName : "DIRECT-AAAZZZ456",
...@@ -694,7 +699,8 @@ export default function actsWifiManagerFunctionTest() { ...@@ -694,7 +699,8 @@ export default function actsWifiManagerFunctionTest() {
} }
console.info("[wifi_test]getP2pLocalDevice callback result: " + JSON.stringify(ret)); console.info("[wifi_test]getP2pLocalDevice callback result: " + JSON.stringify(ret));
console.info("deviceName: " + ret.deviceName + "deviceAddress: " + console.info("deviceName: " + ret.deviceName + "deviceAddress: " +
ret.deviceAddress + "primaryDeviceType: " + ret.primaryDeviceType + ret.deviceAddress + "deviceAddressType: " + ret.deviceAddressType +
"primaryDeviceType: " + ret.primaryDeviceType +
"deviceStatus: " + ret.deviceStatus + "groupCapabilitys: " + "deviceStatus: " + ret.deviceStatus + "groupCapabilitys: " +
ret.groupCapabilitys ); ret.groupCapabilitys );
resolve(); resolve();
......
...@@ -68,12 +68,12 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -68,12 +68,12 @@ export default function actsWifiManagerCandidateNetWorkTest() {
}) })
/** /**
* @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0001 * @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0001
* @tc.name testaddCandidateConfig * @tc.name testaddCandidateConfig
* @tc.desc Test add OPEN and WEP CandidateConfig Promise API functionality. * @tc.desc Test add OPEN and WEP CandidateConfig Promise API functionality.
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_Communication_WiFi_XTS_CandidateNetWork_0001', 0, async function (done) { it('SUB_Communication_WiFi_XTS_CandidateNetWork_0001', 0, async function (done) {
let wifiDeviceConfig = { let wifiDeviceConfig = {
"ssid": "TEST_OPEN", "ssid": "TEST_OPEN",
...@@ -131,16 +131,55 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -131,16 +131,55 @@ export default function actsWifiManagerCandidateNetWorkTest() {
}) })
/** /**
* @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0002 * @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0002
* @tc.name testaddCandidateConfig * @tc.name testaddCandidateConfig
* @tc.desc Test add PSK CandidateConfig and removeCandidateConfig Promise API functionality. * @tc.desc Test add PSK CandidateConfig and removeCandidateConfig Promise API functionality.
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_Communication_WiFi_XTS_CandidateNetWork_0002', 0, async function (done) { it('SUB_Communication_WiFi_XTS_CandidateNetWork_0002', 0, async function (done) {
let EapMethod = {
"EAP_NONE": 0,
"EAP_PEAP": 1,
"EAP_TLS": 2,
"EAP_TTLS": 3,
"EAP_PWD": 4,
"EAP_SIM": 5,
"EAP_AKA": 6,
"EAP_AKA_PRIME": 7,
"EAP_UNAUTH_TLS": 8,
};
let Phase2Method = {
"PHASE2_NONE": 0,
"PHASE2_PAP": 1,
"PHASE2_MSCHAP": 2,
"PHASE2_MSCHAPV2": 3,
"PHASE2_GTC": 4,
"PHASE2_SIM": 5,
"PHASE2_AKA": 6,
"PHASE2_AKA_PRIME": 7,
};
let WifiEapConfig = {
"eapMethod": wifiMg.EapMethod.EAP_NONE,
"phase2Method": wifiMg.Phase2Method.PHASE2_NONE,
"identity": "aaa",
"anonymousIdentity": "bbb",
"password": "12345678",
"caCertAliases": "ddd",
"caPath": "eee",
"clientCertAliases": "fff",
"certEntry": new Uint8Array(),
"certPassword": "12345678",
"altSubjectMatch": "ggg",
"domainSuffixMatch": "hhh",
"realm": "iii",
"plmn": "jjj",
"eapSubId": "kkk",
};
let wifiDeviceConfig = { let wifiDeviceConfig = {
"ssid": "TEST_PSK", "ssid": "TEST_PSK",
"bssid": "22:9b:e6:48:1f:5c", "bssid": "22:9b:e6:48:1f:5c",
"bssidType" : 1,
"preSharedKey": "12345678", "preSharedKey": "12345678",
"isHiddenSsid": false, "isHiddenSsid": false,
"securityType": wifiMg.WifiSecurityType.WIFI_SEC_TYPE_PSK, "securityType": wifiMg.WifiSecurityType.WIFI_SEC_TYPE_PSK,
...@@ -151,6 +190,7 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -151,6 +190,7 @@ export default function actsWifiManagerCandidateNetWorkTest() {
"randomMacType": 0, "randomMacType": 0,
"randomMacAddr": "11:22:33:44:55:66", "randomMacAddr": "11:22:33:44:55:66",
"staticIp": {"ipAddress": 1284752956,"gateway": 1284752936}, "staticIp": {"ipAddress": 1284752956,"gateway": 1284752936},
"eapConfig": wifiMg.WifiEapConfig,
}; };
await wifiMg.addCandidateConfig(wifiDeviceConfig) await wifiMg.addCandidateConfig(wifiDeviceConfig)
.then(netWorkId => { .then(netWorkId => {
...@@ -178,12 +218,12 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -178,12 +218,12 @@ export default function actsWifiManagerCandidateNetWorkTest() {
}) })
/** /**
* @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0003 * @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0003
* @tc.name testaddCandidateConfig * @tc.name testaddCandidateConfig
* @tc.desc Test add SAE CandidateConfig Promise API functionality. * @tc.desc Test add SAE CandidateConfig Promise API functionality.
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_Communication_WiFi_XTS_CandidateNetWork_0003', 0, async function (done) { it('SUB_Communication_WiFi_XTS_CandidateNetWork_0003', 0, async function (done) {
let wifiDeviceConfig = { let wifiDeviceConfig = {
"ssid": "TEST_SAE", "ssid": "TEST_SAE",
...@@ -217,12 +257,12 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -217,12 +257,12 @@ export default function actsWifiManagerCandidateNetWorkTest() {
}) })
/** /**
* @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0004 * @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0004
* @tc.name testaddCandidateConfig * @tc.name testaddCandidateConfig
* @tc.desc Test add MAX CandidateConfig and removeall CandidateConfig. * @tc.desc Test add MAX CandidateConfig and removeall CandidateConfig.
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_Communication_WiFi_XTS_CandidateNetWork_0004', 0, async function (done) { it('SUB_Communication_WiFi_XTS_CandidateNetWork_0004', 0, async function (done) {
let SSID = "TYPE_PSK" let SSID = "TYPE_PSK"
for (let i = 0; i < 16; i++) { for (let i = 0; i < 16; i++) {
...@@ -278,12 +318,12 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -278,12 +318,12 @@ export default function actsWifiManagerCandidateNetWorkTest() {
}) })
/** /**
* @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0005 * @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0005
* @tc.name testaddCandidateConfig * @tc.name testaddCandidateConfig
* @tc.desc Test add CandidateConfig and removeCandidateConfig callback API functionality. * @tc.desc Test add CandidateConfig and removeCandidateConfig callback API functionality.
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_Communication_WiFi_XTS_CandidateNetWork_0005', 0, async function (done) { it('SUB_Communication_WiFi_XTS_CandidateNetWork_0005', 0, async function (done) {
let wifiDeviceConfig = { let wifiDeviceConfig = {
"ssid": "TEST_connect", "ssid": "TEST_connect",
...@@ -329,12 +369,12 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -329,12 +369,12 @@ export default function actsWifiManagerCandidateNetWorkTest() {
}) })
/** /**
* @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0006 * @tc.number SUB_Communication_WiFi_XTS_CandidateNetWork_0006
* @tc.name testaddCandidateConfig * @tc.name testaddCandidateConfig
* @tc.desc Test connect To CandidateConfig API functionality. * @tc.desc Test connect To CandidateConfig API functionality.
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_Communication_WiFi_XTS_CandidateNetWork_0006', 0, async function (done) { it('SUB_Communication_WiFi_XTS_CandidateNetWork_0006', 0, async function (done) {
let wifiDeviceConfig = { let wifiDeviceConfig = {
"ssid": "HONOR 3000", "ssid": "HONOR 3000",
...@@ -381,4 +421,3 @@ export default function actsWifiManagerCandidateNetWorkTest() { ...@@ -381,4 +421,3 @@ export default function actsWifiManagerCandidateNetWorkTest() {
}) })
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册