mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 10:57:51 +00:00
getting node deployed; first test
This commit is contained in:
parent
2f68b2a6f6
commit
f5b669508b
5 changed files with 31 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -18,3 +18,4 @@ pilosa
|
|||
launch.json
|
||||
.terraform.lock.hcl
|
||||
__pycache__/
|
||||
report.xml
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ do
|
|||
break
|
||||
echo "Cluster is up after $${i} tries."
|
||||
fi
|
||||
sleep 20
|
||||
sleep 10
|
||||
done
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,22 @@ echo "using bastion ${BASTION}"
|
|||
NODE=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.data_node_ips][0]["value"][0]')
|
||||
echo "using node ${NODE}"
|
||||
|
||||
echo "Copying tests to remote"
|
||||
scp -r -i ~/.ssh/gitlab-featurebase-ci.pem ./qa/testcases/smoketest ec2-user@${BASTION}:/data
|
||||
if (( $? != 0 ))
|
||||
then
|
||||
echo "Copy failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# run smoke test
|
||||
echo "Running smoke test..."
|
||||
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${BASTION} " pushd /data; pytest --junitxml=report.xml; popd"
|
||||
if (( $? != 0 ))
|
||||
then
|
||||
echo "Unable to run smoketest"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "Smoke test complete"
|
||||
7
qa/testcases/smoketest/test_smoke.py
Normal file
7
qa/testcases/smoketest/test_smoke.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# content of test_smoke.py
|
||||
def inc(x):
|
||||
return x + 1
|
||||
|
||||
|
||||
def test_answer():
|
||||
assert inc(3) == 5
|
||||
|
|
@ -62,5 +62,11 @@ sudo mount /dev/nvme1n1 /data
|
|||
|
||||
sudo chown -R ec2-user /data
|
||||
|
||||
echo "Installing pytest"
|
||||
pip3 install -U pytest
|
||||
pip3 install -U requests
|
||||
|
||||
echo "Done."
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue