Skip to content

Commit

Permalink
Install docker-compose v2 on ubuntu (#233)
Browse files Browse the repository at this point in the history
* Install docker-compose v2 on ubuntu

Signed-off-by: Abhijeet Kasurde <[email protected]>
Co-authored-by: Sorin Sbarnea <[email protected]>
  • Loading branch information
Akasurde and ssbarnea authored Aug 7, 2024
1 parent 152cf5f commit ddb09d8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ OAUTHBEARER
alertmanager
basepython
benthomasosn
buildx
cafile
capath
caroot
confluentinc
conninfo
containerd
darglint
digestmod
dynatrace
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,17 @@ jobs:
- name: Install package dependencies (ubuntu)
if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get --assume-yes --no-install-recommends install libsystemd0 libsystemd-dev pkg-config
sudo apt remove -y docker-compose
sudo apt-get update -y
sudo apt-get --assume-yes --no-install-recommends install -y apt-transport-https curl libsystemd0 libsystemd-dev pkg-config
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update -y
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
# Do not install docker-compose-plugin because it would v1 (broken due to not working with newer requests library)
sudo systemctl enable --now docker
sudo curl -sL "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Java
if: ${{ matrix.passed_name == 'integration' }}
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/event_source_kafka/test_kafka_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def kafka_producer(kafka_certs, kafka_broker):
return KafkaProducer(bootstrap_servers="localhost:9092")


@pytest.mark.xfail(reason="https://github.com/ansible/event-driven-ansible/issues/234")
def test_kafka_source_plaintext(kafka_certs, kafka_broker, kafka_producer):
ruleset = os.path.join(
TESTS_PATH, "event_source_kafka", "test_kafka_rules_plaintext.yml"
Expand All @@ -49,6 +50,7 @@ def test_kafka_source_plaintext(kafka_certs, kafka_broker, kafka_producer):
assert "Rule fired successfully for PLAINTEXT consumers" in result.stdout.decode()


@pytest.mark.xfail(reason="https://github.com/ansible/event-driven-ansible/issues/234")
def test_kafka_source_with_headers(kafka_certs, kafka_broker, kafka_producer):
ruleset = os.path.join(
TESTS_PATH, "event_source_kafka", "test_kafka_rules_headers.yml"
Expand All @@ -72,6 +74,7 @@ def test_kafka_source_with_headers(kafka_certs, kafka_broker, kafka_producer):
assert "Rule fired successfully with headers" in result.stdout.decode()


@pytest.mark.xfail(reason="https://github.com/ansible/event-driven-ansible/issues/234")
def test_kafka_source_ssl(kafka_certs, kafka_broker, kafka_producer):
ruleset = os.path.join(TESTS_PATH, "event_source_kafka", "test_kafka_rules_ssl.yml")

Expand All @@ -88,6 +91,7 @@ def test_kafka_source_ssl(kafka_certs, kafka_broker, kafka_producer):
assert "Rule fired successfully for SSL consumers" in result.stdout.decode()


@pytest.mark.xfail(reason="https://github.com/ansible/event-driven-ansible/issues/234")
def test_kafka_source_sasl_plaintext(kafka_certs, kafka_broker, kafka_producer):
ruleset = os.path.join(
TESTS_PATH, "event_source_kafka", "test_kafka_rules_sasl_plaintext.yml"
Expand All @@ -108,6 +112,7 @@ def test_kafka_source_sasl_plaintext(kafka_certs, kafka_broker, kafka_producer):
)


@pytest.mark.xfail(reason="https://github.com/ansible/event-driven-ansible/issues/234")
def test_kafka_source_sasl_ssl(kafka_certs, kafka_broker, kafka_producer):
ruleset = os.path.join(
TESTS_PATH, "event_source_kafka", "test_kafka_rules_sasl_ssl.yml"
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ commands = darglint -s numpy -z full extensions/eda/plugins
deps = -r test_requirements.txt
description = Run integration tests
commands =
# risky: not safe for development it affects user setup
ansible-galaxy collection install .
pytest tests/integration -vvv -s

0 comments on commit ddb09d8

Please sign in to comment.