提交 f81cd062 编写于 作者: Z zhaimengchao

【account】【master】checkAccountLabels 缺失断言问题

Signed-off-by: Nzhaimengchao <zhaimengchao@huawei.com>
上级 119f3da2
...@@ -71,6 +71,7 @@ export default function ActsAccountAppAccess() { ...@@ -71,6 +71,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>ActsAccountCheckAccountLabels_0100 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(null); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0100 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0100 data:" + JSON.stringify(data));
expect(data).assertEqual(true);
appAccountManager.removeAccount(name, (err) =>{ appAccountManager.removeAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0100 removeAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0100 removeAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(null); expect(err).assertEqual(null);
...@@ -99,6 +100,7 @@ export default function ActsAccountAppAccess() { ...@@ -99,6 +100,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>ActsAccountCheckAccountLabels_0200 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0200 err:" + JSON.stringify(err));
expect(err).assertEqual(null); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0200 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0200 data:" + JSON.stringify(data));
expect(data).assertEqual(false);
appAccountManager.removeAccount(name, (err) =>{ appAccountManager.removeAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0200 removeAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0200 removeAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(null); expect(err).assertEqual(null);
...@@ -126,7 +128,7 @@ export default function ActsAccountAppAccess() { ...@@ -126,7 +128,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>ActsAccountCheckAccountLabels_0300 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(null); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0300 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0300 data:" + JSON.stringify(data));
expect(data).assertEqual(false) expect(data).assertEqual(false);
appAccountManager.removeAccount("CheckAccountLabels_0300", (err) =>{ appAccountManager.removeAccount("CheckAccountLabels_0300", (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0300 removeAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0300 removeAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(null); expect(err).assertEqual(null);
...@@ -152,6 +154,7 @@ export default function ActsAccountAppAccess() { ...@@ -152,6 +154,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_success");
appAccountManager.checkAccountLabels(name, owner, ['level4']).then((data) =>{ appAccountManager.checkAccountLabels(name, owner, ['level4']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0400 data:" + JSON.stringify(data));
expect(data).assertEqual(true);
appAccountManager.removeAccount(name).then((data) =>{ appAccountManager.removeAccount(name).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 delete_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0400 delete_account_success");
done(); done();
...@@ -185,6 +188,7 @@ export default function ActsAccountAppAccess() { ...@@ -185,6 +188,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>ActsAccountCheckAccountLabels_0500 add_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0500 add_account_success");
appAccountManager.checkAccountLabels(name, owner, ['20-30']).then((data) =>{ appAccountManager.checkAccountLabels(name, owner, ['20-30']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0500 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0500 data:" + JSON.stringify(data));
expect(data).assertEqual(false);
expect(account.Constants.KEY_REQUIRED_LABELS).assertEqual('requiredLabels') expect(account.Constants.KEY_REQUIRED_LABELS).assertEqual('requiredLabels')
expect(account.Constants.KEY_BOOLEAN_RESULT).assertEqual('booleanResult') expect(account.Constants.KEY_BOOLEAN_RESULT).assertEqual('booleanResult')
appAccountManager.removeAccount(name).then((data) =>{ appAccountManager.removeAccount(name).then((data) =>{
...@@ -220,6 +224,7 @@ export default function ActsAccountAppAccess() { ...@@ -220,6 +224,7 @@ export default function ActsAccountAppAccess() {
console.debug("====>ActsAccountCheckAccountLabels_0600 add_account_success:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0600 add_account_success:" + JSON.stringify(data));
appAccountManager.checkAccountLabels('CheckAccountLabels_0600', owner, ['male']).then((data) =>{ appAccountManager.checkAccountLabels('CheckAccountLabels_0600', owner, ['male']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0600 data:" + JSON.stringify(data));
expect(data).assertEqual(false);
appAccountManager.removeAccount('CheckAccountLabels_0600').then((data) =>{ appAccountManager.removeAccount('CheckAccountLabels_0600').then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 delete_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0600 delete_account_success");
done(); done();
......
...@@ -70,6 +70,7 @@ export default function ActsAccountAuthenticator() { ...@@ -70,6 +70,7 @@ export default function ActsAccountAuthenticator() {
console.debug("====>ActsAccountCheckAccountLabels_0100 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0100 err:" + JSON.stringify(err));
expect(err).assertEqual(null); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0100 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0100 data:" + JSON.stringify(data));
expect(data).assertEqual(true);
appAccountManager.deleteAccount(name, (err) =>{ appAccountManager.deleteAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0100 deleteAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0100 deleteAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(null); expect(err).assertEqual(null);
...@@ -98,6 +99,7 @@ export default function ActsAccountAuthenticator() { ...@@ -98,6 +99,7 @@ export default function ActsAccountAuthenticator() {
console.debug("====>ActsAccountCheckAccountLabels_0200 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0200 err:" + JSON.stringify(err));
expect(err).assertEqual(null); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0200 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0200 data:" + JSON.stringify(data));
expect(data).assertEqual(false);
appAccountManager.deleteAccount(name, (err) =>{ appAccountManager.deleteAccount(name, (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0200 deleteAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0200 deleteAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(null); expect(err).assertEqual(null);
...@@ -125,7 +127,7 @@ export default function ActsAccountAuthenticator() { ...@@ -125,7 +127,7 @@ export default function ActsAccountAuthenticator() {
console.debug("====>ActsAccountCheckAccountLabels_0300 err:" + JSON.stringify(err)); console.debug("====>ActsAccountCheckAccountLabels_0300 err:" + JSON.stringify(err));
expect(err).assertEqual(null); expect(err).assertEqual(null);
console.debug("====>ActsAccountCheckAccountLabels_0300 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0300 data:" + JSON.stringify(data));
expect(data).assertEqual(false) expect(data).assertEqual(false);
appAccountManager.deleteAccount("CheckAccountLabels_0300", (err) =>{ appAccountManager.deleteAccount("CheckAccountLabels_0300", (err) =>{
console.debug("====>ActsAccountCheckAccountLabels_0300 deleteAccount_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0300 deleteAccount_err:" + JSON.stringify(err))
expect(err).assertEqual(null); expect(err).assertEqual(null);
...@@ -151,6 +153,7 @@ export default function ActsAccountAuthenticator() { ...@@ -151,6 +153,7 @@ export default function ActsAccountAuthenticator() {
console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_success");
appAccountManager.checkAccountLabels(name, owner, ['level4']).then((data) =>{ appAccountManager.checkAccountLabels(name, owner, ['level4']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0400 data:" + JSON.stringify(data));
expect(data).assertEqual(true);
appAccountManager.deleteAccount(name).then((data) =>{ appAccountManager.deleteAccount(name).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0400 delete_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0400 delete_account_success");
}).catch((err) =>{ }).catch((err) =>{
...@@ -164,7 +167,7 @@ export default function ActsAccountAuthenticator() { ...@@ -164,7 +167,7 @@ export default function ActsAccountAuthenticator() {
}) })
}).catch((err) => { }).catch((err) => {
console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_err:" + JSON.stringify(err)) console.debug("====>ActsAccountCheckAccountLabels_0400 add_account_err:" + JSON.stringify(err))
expect(err.code!=0).assertTrue(); expect().assertFail();
done(); done();
}) })
}); });
...@@ -182,6 +185,7 @@ export default function ActsAccountAuthenticator() { ...@@ -182,6 +185,7 @@ export default function ActsAccountAuthenticator() {
console.debug("====>ActsAccountCheckAccountLabels_0500 add_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0500 add_account_success");
appAccountManager.checkAccountLabels(name, owner, ['20-30']).then((data) =>{ appAccountManager.checkAccountLabels(name, owner, ['20-30']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0500 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0500 data:" + JSON.stringify(data));
expect(data).assertEqual(false);
expect(account.Constants.KEY_REQUIRED_LABELS).assertEqual('requiredLabels') expect(account.Constants.KEY_REQUIRED_LABELS).assertEqual('requiredLabels')
expect(account.Constants.KEY_BOOLEAN_RESULT).assertEqual('booleanResult') expect(account.Constants.KEY_BOOLEAN_RESULT).assertEqual('booleanResult')
appAccountManager.deleteAccount(name).then((data) =>{ appAccountManager.deleteAccount(name).then((data) =>{
...@@ -215,6 +219,7 @@ export default function ActsAccountAuthenticator() { ...@@ -215,6 +219,7 @@ export default function ActsAccountAuthenticator() {
console.debug("====>ActsAccountCheckAccountLabels_0600 add_account_success:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0600 add_account_success:" + JSON.stringify(data));
appAccountManager.checkAccountLabels('CheckAccountLabels_0600', owner, ['male']).then((data) =>{ appAccountManager.checkAccountLabels('CheckAccountLabels_0600', owner, ['male']).then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 data:" + JSON.stringify(data)); console.debug("====>ActsAccountCheckAccountLabels_0600 data:" + JSON.stringify(data));
expect(data).assertEqual(false);
appAccountManager.deleteAccount('CheckAccountLabels_0600').then((data) =>{ appAccountManager.deleteAccount('CheckAccountLabels_0600').then((data) =>{
console.debug("====>ActsAccountCheckAccountLabels_0600 delete_account_success"); console.debug("====>ActsAccountCheckAccountLabels_0600 delete_account_success");
}).catch((err) =>{ }).catch((err) =>{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册