Test flow in production mode
Login router and download powter-client testflow packages
wget https://github.com/hilanderas/powter-client/releases/download/0.8.2/powter-client-testflow-0.8.2.zip
unzip powter-client-testflow-0.8.2.zip
Check releases page for other versions
Download powter-client packages
cd powter-client-testflow
make -f main.mk download ARCH=[ARCH]
ARCH: x86 or armv6
Check integrity of downloaded packages
md5sum -c powter-client-testflow-0.8.2.md5
Config test environment
Update
info.ymlandinfo_slave.ymlinpowter-client-testflowto meet your test environmentSet project path, info file path and lan port
make -f main.mk config TEST_PROJ=[PROJECT] TEST_INFO=[TEST_INFO] IFACE=[IFACE]Description of each attribute:
TEST_PROJ: Path ofpowter-client-*TEST_INFO: Absolute path ofinfo.ymlIFACE: WAN of routere.g,
make -f main.mk config TEST_PROJ=$PWD/powter-client-x86 TEST_INFO=$PWD/info.yml IFACE=enp2s0Check configuration
make -f main.mk -s read_config
Run test flow
- Run functional test flow
make -f function.mk test_install make -f function.mk test_uninstall make -f function.mk test_installafteruninstall make -f function.mk test_reinstall make -f function.mk test_reuninstall make -f function.mk test_checkvps Run restart test flow
make -f restart.mk test_reboot_p1 make -f restart.mk test_reboot_p2 make -f restart.mk test_poweroff_p1 make -f restart.mk test_poweroff_p2 make -f restart.mk test_isprestart make -f restart.mk test_restartallRun update test flow
- Update dns or sskcp configuration
make -f update.mk test_update_dns make -f update.mk test_update_sskcp Switch vps test
In this scenario, we assume that dns server and sskcp server are the same and we want to switch them to another groups and switch back again. Prepare info_slave.yml, the main different between info.yml and info_slave.yml is the dns server IP and sskcp IP.
make -f update.mk switch SLAVE=[SLAVE]e.g,
make -f update.mk switch SLAVE=/home/qa/info_slave.yml
- Update dns or sskcp configuration
Clean up
rm -r ~/powter-client-x86*