File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 3232 - name : Linting code
3333 run : |
3434 ansible-lint -v --force-color
35+
36+ integration :
37+ runs-on : ubuntu-latest
38+ steps :
39+ # Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
40+ - uses : actions/checkout@v2
41+
42+ - name : Install dependencies
43+ run : |
44+ python -m pip install --upgrade pip
45+ pip install ansible==5.*
46+ ansible-galaxy collection install git+file://$(pwd)
47+
48+ - name : Run Pulp in one
49+ run : |
50+ tests/pulp-in-one.sh
51+
52+ # TODO: Use ansible-test to run these.
53+ - name : Running integration tests
54+ run : |
55+ ansible-playbook -v tests/*.yml
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Run a Pulp in one container, and reset the admin password to 'password'.
4+ # Use only for testing!
5+
6+ set -eu
7+ set -o pipefail
8+
9+ mkdir -p settings
10+
11+ cat << EOF > settings/settings.py
12+ CONTENT_ORIGIN='http://$( hostname) :8080'
13+ ANSIBLE_API_HOSTNAME='http://$( hostname) :8080'
14+ ANSIBLE_CONTENT_HOSTNAME='http://$( hostname) :8080/pulp/content'
15+ TOKEN_AUTH_DISABLED=True
16+ EOF
17+
18+ # Run Pulp in one container.
19+ docker run \
20+ --detach \
21+ --name pulp \
22+ --volume " $( pwd) /settings" :/etc/pulp \
23+ --publish 8080:80 \
24+ pulp/pulp:latest
25+
26+ # Wait for it to come up.
27+ attempts=0
28+ until curl --fail http://localhost:8080/pulp/api/v3/status/ > /dev/null 2>&1 ; do
29+ sleep 2
30+ attempts=$(( attempts + 1 ))
31+ if [[ $attempts -ge 60 ]]; then
32+ echo " Timed out waiting for pulp"
33+ docker logs pulp
34+ exit 1
35+ fi
36+ done
37+
38+ # Reset the admin password.
39+ docker exec pulp pulpcore-manager reset-admin-password --password password
You can’t perform that action at this time.
0 commit comments