mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	regression_test: Fix logic for checking status code
Signed-off-by: matthew <stidmatt@gmail.com>
This commit is contained in:
		@@ -70,8 +70,11 @@ while getopts ":h:s:S:p:w:m:A:r:F:B:U:D:H:" option; do
 | 
				
			|||||||
  esac
 | 
					  esac
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SCENARIO_CHECK=$(python -c "import requests; print(requests.get('http://${MGR}:8080/events/since=time/1h'))")
 | 
					SCENARIO_CHECK="$(python -c "import requests; print(requests.get('http://${MGR}:8080/events/since=time/1h').status_code)")"
 | 
				
			||||||
if [[ ${SCENARIO_CHECK} != 200 ]]; then
 | 
					if [[ ${SCENARIO_CHECK} -eq 200 ]]; then
 | 
				
			||||||
 | 
					  pass
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo "${SCENARIO_CHECK}"
 | 
				
			||||||
  echo "Your LANforge Manager is out of date. Regression test requires LANforge version 5.4.4 or higher in order to run"
 | 
					  echo "Your LANforge Manager is out of date. Regression test requires LANforge version 5.4.4 or higher in order to run"
 | 
				
			||||||
  echo "Please upgrade your LANforge using instructions found at https://www.candelatech.com/downloads.php#releases"
 | 
					  echo "Please upgrade your LANforge using instructions found at https://www.candelatech.com/downloads.php#releases"
 | 
				
			||||||
  exit 1
 | 
					  exit 1
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user