Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void test() throws Exception {
- SimpleTelnetClient client = new SimpleTelnetClient(getParameter("ip"), 33001); //$NON-NLS-1$
- client.connect();
- client.send("\r\r");
- Thread.sleep(1000);
- if(controller.getDeviceProfile().getSelectedModification().getFirmware() == null) {
- status = Test.Status.Fail;
- throw new Exception("Не задана версия прошивки");
- }
- String txt = client.exchange("grep -r OpenWrt /etc/openwrt_release \r", "#", 3000);
- LOG.info(txt);
- if(txt == null || !(txt.contains(controller.getDeviceProfile().getSelectedModification().getFirmware()))) {
- status = Test.Status.Fail;
- throw new Exception("Версия ОС не " + controller.getDeviceProfile().getSelectedModification().getFirmware());
- }
- client.disconnect();
- status = Test.Status.Success;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement