提交 165261c7 编写于 作者: R raoxian

修改fileioerror用例编号

Signed-off-by: Nraoxian <raoxian@huawei.com>
上级 03be2fd6
......@@ -34,12 +34,16 @@ export default function FileIOError() {
describe('FileIOError', function () {
/**
* @tc.number SUB_STORAGE_FileIo_test_error_0100
* @tc.name fileio_test_error_001
* @tc.number SUB_STORAGE_FileIo_test_error_0000
* @tc.name fileio_test_error_000
* @tc.desc Function of API, delete file
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it('fileio_test_error_001', 0, async function (done) {
let fpath = await fileName('fileio_test_error_001f');
it('fileio_test_error_000', 0, async function (done) {
let fpath = await fileName('fileio_test_error_000f');
expect(prepareFile(fpath, 'hello')).assertTrue();
try {
let fd = fileio.openSync(fpath);
......@@ -47,7 +51,7 @@ describe('FileIOError', function () {
fileio.rmdirSync(fpath);
}
catch (err) {
console.info('fileio_test_error_001 has failed for ' + err);
console.info('fileio_test_error_000 has failed for ' + err);
expect(isInclude(err.message, 'Not a directory')).assertTrue();
fileio.unlinkSync(fpath);
done();
......@@ -55,18 +59,22 @@ describe('FileIOError', function () {
});
/**
* @tc.number SUB_STORAGE_FileIo_test_error_0200
* @tc.name fileio_test_error_002
* @tc.number SUB_STORAGE_FileIo_test_error_0100
* @tc.name fileio_test_error_001
* @tc.desc Function of API, flags=0o100. missing mode parameter.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it('fileio_test_error_002', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_002');
it('fileio_test_error_001', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_001');
expect(prepareFile(fpath, FILE_CONTENT)).assertTrue();
try {
fileio.openSync(fpath, 0o100);
}
catch (err) {
console.info('fileio_test_error_002 has failed for ' + err);
console.info('fileio_test_error_001 has failed for ' + err);
expect(isInclude(err.message, 'called with O_CREAT/O_TMPFILE but no mode')).assertTrue();
fileio.unlinkSync(fpath);
done();
......@@ -74,18 +82,22 @@ describe('FileIOError', function () {
});
/**
* @tc.number SUB_STORAGE_FileIO_OpenSync_0300
* @tc.name fileio_test_error_003
* @tc.number SUB_STORAGE_FileIO_OpenSync_0200
* @tc.name fileio_test_error_002
* @tc.desc Function of API, flags=0o302. The test file is exist.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it('fileio_test_error_003', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_003');
it('fileio_test_error_002', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_002');
expect(prepareFile(fpath, FILE_CONTENT)).assertTrue();
try {
fileio.openSync(fpath, 0o302, 0o666);
}
catch (err) {
console.info('fileio_test_error_003 has failed for ' + err);
console.info('fileio_test_error_002 has failed for ' + err);
expect(isInclude(err.message, 'File exists')).assertTrue();
fileio.unlinkSync(fpath);
done();
......@@ -93,12 +105,16 @@ describe('FileIOError', function () {
});
/**
* @tc.number SUB_STORAGE_FileIO_OpenSync_0400
* @tc.name fileio_test_error_004
* @tc.number SUB_STORAGE_FileIO_OpenSync_0300
* @tc.name fileio_test_error_003
* @tc.desc Function of API, flags=0o400000. Symbolic link loop.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it('fileio_test_error_004', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_004');
it('fileio_test_error_003', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_003');
let ffpath = fpath + 'aaaa';
expect(prepareFile(fpath, FILE_CONTENT)).assertTrue();
try {
......@@ -106,7 +122,7 @@ describe('FileIOError', function () {
fileio.openSync(ffpath, 0o400000);
}
catch (err) {
console.info('fileio_test_error_004 has failed for ' + err);
console.info('fileio_test_error_003 has failed for ' + err);
expect(isInclude(err.message, 'Symbolic link loop') ||
isInclude(err.message, 'Too many symbolic links encountered')).assertTrue();
fileio.unlinkSync(fpath);
......@@ -116,18 +132,22 @@ describe('FileIOError', function () {
});
/**
* @tc.number SUB_STORAGE_FileIO_OpenSync_0500
* @tc.name fileio_test_error_005
* @tc.number SUB_STORAGE_FileIO_OpenSync_0400
* @tc.name fileio_test_error_004
* @tc.desc Function of API, flags=0o200000. Not a directory.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it('fileio_test_error_005', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_005');
it('fileio_test_error_004', 0, async function (done) {
let fpath = await nextFileName('fileio_test_error_004');
expect(prepareFile(fpath, FILE_CONTENT)).assertTrue();
try {
fileio.openSync(fpath, 0o200000, 0o666);
}
catch (err) {
console.info('fileio_test_error_005 has failed for ' + err);
console.info('fileio_test_error_004 has failed for ' + err);
expect(isInclude(err.message, 'Not a directory')).assertTrue();
fileio.unlinkSync(fpath);
done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册