未验证 提交 285742c8 编写于 作者: O openharmony_ci 提交者: Gitee

!6137 【OpenHarmony 3.2.8.1】【安全子系统】【monthly_20221018】API9接口测试套适配

Merge pull request !6137 from qiaozzzh/cherry-pick-1666751086
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
import userauthTest from './Security_IAM_PIN_Kit_CallbackJsunit.test.js' import userauthTest from './Security_IAM_PIN_Kit_CallbackJsunit.test.js'
import userauthTest_API9 from './Security_IAM_FUNC_Jsunit.test.js'
export default function testsuite() { export default function testsuite() {
userauthTest() userauthTest()
userauthTest_API9()
} }
...@@ -73,7 +73,7 @@ describe('userauthTest', function () { ...@@ -73,7 +73,7 @@ describe('userauthTest', function () {
*/ */
it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) { it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) {
let contextID1 = null let contextID1 = null
let challenge = [253, 19, 58, 160, 67, 200, 247, 37] let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
let onresult = { let onresult = {
authresult: null, authresult: null,
authextr: null, authextr: null,
...@@ -108,62 +108,6 @@ describe('userauthTest', function () { ...@@ -108,62 +108,6 @@ describe('userauthTest', function () {
}) })
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0104
* @tc.name : Kit interface enum AuthTrustLevel
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it('Security_IAM_PIN_Kit_Func_0104', 0, async function (done) {
console.info('testFace Security_IAM_PIN_Kit_Func_0104 start');
expect(10000).assertEqual(userAuthNorth.AuthTrustLevel.ATL1);
expect(20000).assertEqual(userAuthNorth.AuthTrustLevel.ATL2);
expect(30000).assertEqual(userAuthNorth.AuthTrustLevel.ATL3);
expect(40000).assertEqual(userAuthNorth.AuthTrustLevel.ATL4);
console.info('testFace Security_IAM_PIN_Kit_Func_0104 end');
done();
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0105
* @tc.name : Kit interface enum FaceTips
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it('Security_IAM_PIN_Kit_Func_0105', 0, async function (done) {
console.info('testFace Security_IAM_PIN_Kit_Func_0105 start');
expect(1).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_BRIGHT);
expect(2).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_DARK);
expect(3).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_CLOSE);
expect(4).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_FAR);
expect(5).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_HIGH);
expect(6).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_LOW);
expect(7).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_RIGHT);
expect(8).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_LEFT);
expect(9).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_TOO_MUCH_MOTION);
expect(10).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_POOR_GAZE);
expect(11).assertEqual(userAuthNorth.FaceTips.FACE_AUTH_TIP_NOT_DETECTED);
console.info('testFace Security_IAM_PIN_Kit_Func_0105 end');
done();
})
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0106
* @tc.name : Kit interface enum UserAuthType
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it('Security_IAM_PIN_Kit_Func_0106', 0, async function (done) {
console.info('testFace Security_IAM_PIN_Kit_Func_0106 start');
expect(2).assertEqual(userAuthNorth.UserAuthType.FACE);
expect(4).assertEqual(userAuthNorth.UserAuthType.FINGERPRINT);
console.info('testFace Security_IAM_PIN_Kit_Func_0106 end');
done();
})
/* /*
* @tc.number : Security_IAM_PIN_Kit_Func_0107 * @tc.number : Security_IAM_PIN_Kit_Func_0107
* @tc.name : Kit interface enum ResultCode * @tc.name : Kit interface enum ResultCode
...@@ -188,25 +132,7 @@ describe('userauthTest', function () { ...@@ -188,25 +132,7 @@ describe('userauthTest', function () {
done(); done();
}) })
/*
* @tc.number : Security_IAM_PIN_Kit_Func_0108
* @tc.name : Kit interface enum FingerprintTips
* @tc.size : MediumTest
* @tc.type : Function
* @tc.level : Level 0
*/
it('Security_IAM_PIN_Kit_Func_0108', 0, async function (done) {
console.info('testFace Security_IAM_PIN_Kit_Func_0108 start');
expect(0).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_AUTH_TIP_GOOD);
expect(1).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_AUTH_TIP_DIRTY);
expect(2).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_AUTH_TIP_INSUFFICIENT);
expect(3).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_AUTH_TIP_PARTIAL);
expect(4).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_AUTH_TIP_TOO_FAST);
expect(5).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_AUTH_TIP_TOO_SLOW);
console.info('testFace Security_IAM_PIN_Kit_Func_0108 end');
done();
})
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册