2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2024-11-23 18:10:14 +00:00
4 Test Design of xcat inventory diff
xuweibj edited this page 2018-09-13 14:53:37 +08:00

Introduction

This document provides an overview of test xcat-inventory diff command. This test plan is intended for the use of xCAT FVT team.

The test is against xCAT version 2.14.4. The build of xCAT will be picked up from the xcat.org

Test scenarios

  1. Compare 2 inventory files
  • Create 2 inventory files, objects: node site osimage network, compared with the first one, the second need to contain content as below:

    • Add/delete dict type data
    • Add/delete string from list data
    • Modify value of attribute
  • Compare these 2 files by xcat-inventory diff --files <file1> <file2>

  • Check output whether is same with prepared output file

  1. Compare 1 inventory with xCAT DB
  • Backup current inventory info

  • Import inventory file to xCAT DB

  • Compare the inventory file exported withe xCAT DB by xcat-inventory diff --source <file>

  • Check output whether is same with prepared output file

  • Recover environment

  1. Compare 1 inventory with xCAT DB with --all option
  • Compare the inventory file exported withe xCAT DB by xcat-inventory diff --source <file> --all

  • Check output whether contains diff string

  1. Error commands test
  • Run xcat-inventory diff --files <file1> <file2> --all, check error message

  • Run xcat-inventory diff --source <file> --filename <filename>, check error message

  • Run xcat-inventory diff, check error message

  • Run xcat-inventory diff --files <file1> <file2> --source <file>, check error message

  • Run xcat-inventory diff --filename <filename>, check error message

  • Run xcat-inventory diff --files <no_exist_file> <file2>, check error message