Skip to content

Commit ab38cb7

Browse files
Test/declarative password (#413)
* Adding tests for declarative passwords * Fixing test issues * Changing resource class * change number of parallel processes for small test * save logger output into /test-results * output docker container logs in logs * fix docker container logging * add ansible mode 0666 * Updating timeout vals * change back wait_for_containers Co-authored-by: TheCamNelson <[email protected]>
1 parent 7e45aae commit ab38cb7

File tree

5 files changed

+164
-53
lines changed

5 files changed

+164
-53
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
debian10-testing:
3636
machine:
3737
image: circleci/classic:latest
38+
resource_class: xlarge
3839
steps:
3940
- checkout
4041
- run:
@@ -67,7 +68,7 @@ jobs:
6768
- run:
6869
name: Run large Debian 10 image tests
6970
command: make run_large_tests_debian10
70-
no_output_timeout: 20m
71+
no_output_timeout: 1h
7172
- store_artifacts:
7273
path: test-results
7374
destination: test-results
@@ -76,6 +77,7 @@ jobs:
7677
redhat8-testing:
7778
machine:
7879
image: circleci/classic:latest
80+
resource_class: xlarge
7981
steps:
8082
- checkout
8183
- run:
@@ -105,7 +107,7 @@ jobs:
105107
- run:
106108
name: Run large Redhat 8 image tests
107109
command: make run_large_tests_redhat8
108-
no_output_timeout: 20m
110+
no_output_timeout: 1h
109111
- store_artifacts:
110112
path: test-results
111113
destination: test-results

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,15 @@ test_debian10: clean ansible splunk-debian-10 uf-debian-10 test_setup run_small_
305305

306306
run_small_tests_centos7:
307307
@echo 'Running the super awesome small tests; CentOS 7'
308-
pytest -n 3 --reruns 1 -sv tests/test_single_splunk_image.py --platform centos-7 --junitxml test-results/centos7-result/testresults_small_centos7.xml
308+
pytest -n 2 --reruns 1 -sv tests/test_single_splunk_image.py --platform centos-7 --junitxml test-results/centos7-result/testresults_small_centos7.xml
309309

310310
run_large_tests_centos7:
311311
@echo 'Running the super awesome large tests; CentOS 7'
312312
pytest -n 2 --reruns 1 -sv tests/test_distributed_splunk_image.py --platform centos-7 --junitxml test-results/centos7-result/testresults_large_centos7.xml
313313

314314
run_small_tests_redhat8:
315315
@echo 'Running the super awesome small tests; RedHat 8'
316-
pytest -n 3 --reruns 1 -sv tests/test_single_splunk_image.py --platform redhat-8 --junitxml test-results/redhat8-result/testresults_small_redhat8.xml
316+
pytest -n 2 --reruns 1 -sv tests/test_single_splunk_image.py --platform redhat-8 --junitxml test-results/redhat8-result/testresults_small_redhat8.xml
317317

318318
run_large_tests_redhat8:
319319
@echo 'Running the super awesome large tests; RedHat 8'
@@ -330,15 +330,15 @@ test_setup:
330330

331331
run_small_tests_debian9:
332332
@echo 'Running the super awesome small tests; Debian 9'
333-
pytest -n 3 --reruns 1 -sv tests/test_single_splunk_image.py --platform debian-9 --junitxml test-results/debian9-result/testresults_small_debian9.xml
333+
pytest -n 2 --reruns 1 -sv tests/test_single_splunk_image.py --platform debian-9 --junitxml test-results/debian9-result/testresults_small_debian9.xml
334334

335335
run_large_tests_debian9:
336336
@echo 'Running the super awesome large tests; Debian 9'
337337
pytest -n 2 --reruns 1 -sv tests/test_distributed_splunk_image.py --platform debian-9 --junitxml test-results/debian9-result/testresults_large_debian9.xml
338338

339339
run_small_tests_debian10:
340340
@echo 'Running the super awesome small tests; Debian 10'
341-
pytest -n 3 --reruns 1 -sv tests/test_single_splunk_image.py --platform debian-10 --junitxml test-results/debian10-result/testresults_small_debian10.xml
341+
pytest -n 2 --reruns 1 -sv tests/test_single_splunk_image.py --platform debian-10 --junitxml test-results/debian10-result/testresults_small_debian10.xml
342342

343343
run_large_tests_debian10:
344344
@echo 'Running the super awesome large tests; Debian 10'

tests/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# Setup logging
3131
LOGGER = logging.getLogger("docker-splunk")
3232
LOGGER.setLevel(logging.INFO)
33-
file_handler = logging.handlers.RotatingFileHandler(os.path.join(FILE_DIR, "docker_splunk_test_python{}.log".format(sys.version_info[0])), maxBytes=25000000)
33+
file_handler = logging.handlers.RotatingFileHandler(os.path.join(FILE_DIR, "..", "test-results", "docker_splunk_test_python{}.log".format(sys.version_info[0])), maxBytes=25000000)
3434
formatter = logging.Formatter('%(asctime)s %(levelname)s [%(name)s] [%(process)d] %(message)s')
3535
file_handler.setFormatter(formatter)
3636
LOGGER.addHandler(file_handler)

tests/fixtures/sudo_touch_dummy_file.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
dest: /tmp/i-am
66
owner: root
77
group: root
8+
mode: 0666
89
become: yes
910
become_user: root

0 commit comments

Comments
 (0)