Skip to content

Commit 8fbcfa6

Browse files
author
Florian Goth
committedJan 3, 2024
rearrange tests
1 parent d95c4eb commit 8fbcfa6

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed
 

‎molecule/default/converge.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
name: "geekoops-redis"
88
## Setup test enviroment
99
# test whether redis server accepts connections on the unix socket
10-
- name: test connection to socket
11-
tags: molecule-idempotence-notest
12-
ansible.builtin.command:
13-
argv:
14-
- redis-cli
15-
- -s
16-
- /var/run/redis/default.sock
17-
- ping
10+
# - name: test connection to socket
11+
# tags: molecule-idempotence-notest
12+
# ansible.builtin.command:
13+
# argv:
14+
# - redis-cli
15+
# - -s
16+
# - /var/run/redis/default.sock
17+
# - ping
+3-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#!/usr/bin/python3
22
# -*- coding: utf-8 -*-
33

4-
54
import testinfra.utils.ansible_runner
65
import os
76

87
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
98

10-
def test_phpinfo(host):
11-
cmd = host.run("curl -v http://127.0.0.1/index.html")
9+
def test_pingpong(host):
10+
cmd = host.run("redis-cli -s /var/run/redis/default.sock ping")
1211
print(cmd.stdout)
13-
assert 'HTTP/1.1 200 OK' in cmd.stderr
14-
assert "Success" in cmd.stdout
15-
assert "The test page is displayed correctly" in cmd.stdout
12+
assert "PONG" in cmd.stdout

0 commit comments

Comments
 (0)
Please sign in to comment.