forked from rowshan/eds_e2e
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sro
committed
Jan 18, 2018
0 parents
commit 63c8a87
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM python:2.7-slim | ||
|
||
#RUN mkdir -p /home/elastest/eds/eds-e2e | ||
|
||
WORKDIR /app | ||
|
||
# Copy the current directory contents into the container at /app | ||
ADD . /app | ||
|
||
|
||
# install packages and clean up | ||
RUN printf "Starting update...\n" && \ | ||
apt-get update -qq && \ | ||
printf "Update finished.\n" && \ | ||
printf "Starting dist-upgrade...\n" && \ | ||
apt-get dist-upgrade -y > /dev/null && \ | ||
printf "Upgrade finished.\n" && \ | ||
printf "Starting install...\n" && \ | ||
apt-get install -y \ | ||
curl \ | ||
build-essential \ | ||
netbase \ | ||
iproute2 \ | ||
python-pip \ | ||
python-dev \ | ||
libev-dev \ | ||
gcc \ | ||
make \ | ||
automake \ | ||
jq > /dev/null && \ | ||
apt-get clean && \ | ||
printf "Installation and cleanup finished.\n" | ||
|
||
|
||
|
||
# Install any needed packages specified in requirements.txt | ||
RUN pip install --trusted-host pypi.python.org -r requirements.txt | ||
|
||
# Make port 80 available to the world outside this container | ||
EXPOSE 7070 | ||
|
||
CMD ["python"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
selenium | ||
requests | ||
setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import unittest | ||
import requests | ||
import os | ||
|
||
|
||
class TJob(unittest.TestCase): | ||
# proxyurl="http://" + os.environ['ET_SUT_HOST'] + ":8080/" | ||
print "Value of the Environment variable ET_EUS_API is:" + os.environ['JAVA_HOME'] | ||
print "Value of the Environment variable ET_ETM_API is:" + os.environ['ET_ETM_API'] | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import unittest | ||
import requests | ||
import os | ||
import sys | ||
|
||
|
||
class TJob(): | ||
proxyurl = "http://" + str(sys.argv[1]) + ":8080/" | ||
proxies = {'http': proxyurl, 'https': proxyurl} | ||
|
||
def test_send_request(self): | ||
s = requests.Session() | ||
response = s.get('http://www.elastest.io/', proxies=self.proxies, verify=False) | ||
# response=s.get('http://etm:8091/') | ||
print response.headers | ||
assert "Elastest" in response.text | ||
|
||
|
||
if __name__ == "__main__": | ||
tjob = TJob() | ||
tjob.test_send_request() |