Skip to content

Commit

Permalink
test: remove auto env setup
Browse files Browse the repository at this point in the history
  • Loading branch information
developStorm committed May 20, 2024
1 parent 202473a commit b8e3273
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ jobs:
- name: Check out source
uses: actions/checkout@v4

- name: Prep test dependencies
- name: Prepare test dependencies
run: |
set -e
sudo wget https://github.com/jmespath/jp/releases/download/0.2.1/jp-linux-amd64 -O /usr/local/bin/jp
sudo chmod +x /usr/local/bin/jp
pip install --user zschema
pip install -r requirements.txt
- name: Run tests
env:
TEST_MODULES: "http"
run: |
make integration-test
14 changes: 2 additions & 12 deletions integration_tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ set -o pipefail
#

# Run from root of project
TEST_DIR=$(dirname "$0")
ZGRAB_ROOT=$(git rev-parse --show-toplevel)
INTEGRATION_TEST_VENV=".integration_tests.venv"

cd "$ZGRAB_ROOT"

Expand All @@ -39,8 +37,8 @@ ZGRAB_OUTPUT="zgrab-output"
mkdir -p $ZGRAB_OUTPUT

if ! which jp; then
go get github.com/jmespath/jp && go build github.com/jmespath/jp
export PATH=$PATH:$GOPATH/bin
echo "Please install jp"
exit 1
fi

pushd integration_tests
Expand Down Expand Up @@ -74,14 +72,6 @@ status=0
failures=""
echo "Doing schema validation..."

if ! [ -f "${INTEGRATION_TEST_VENV}/bin/python" ]; then
virtualenv "${INTEGRATION_TEST_VENV}"
"${INTEGRATION_TEST_VENV}/bin/pip" install zschema
"${INTEGRATION_TEST_VENV}/bin/pip" install -r requirements.txt
fi

. "${INTEGRATION_TEST_VENV}/bin/activate"

for protocol in $(ls $ZGRAB_OUTPUT); do
for outfile in $(ls $ZGRAB_OUTPUT/$protocol); do
target="$ZGRAB_OUTPUT/$protocol/$outfile"
Expand Down

0 comments on commit b8e3273

Please sign in to comment.