Skip to content

Commit 6a3d884

Browse files
author
jordanbreen28
committed
(CONT-347) - correct centos/alma/rocky 8 hanging tests
1 parent 4b3ec4d commit 6a3d884

File tree

2 files changed

+59
-11
lines changed

2 files changed

+59
-11
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,63 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
Spec:
11-
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
12-
with:
13-
runs_on: "ubuntu-20.04"
14-
secrets: "inherit"
10+
# Spec:
11+
# uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
12+
# with:
13+
# runs_on: "ubuntu-20.04"
14+
# secrets: "inherit"
1515

16+
# Acceptance:
17+
# # needs: Spec
18+
# runs-on: ubuntu-20.04
1619
Acceptance:
17-
needs: Spec
18-
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
19-
with:
20-
runs_on: "ubuntu-20.04"
21-
secrets: "inherit"
20+
name: "Acceptance tests (centos:8 puppet7)"
21+
runs-on: ubuntu-20.04
22+
23+
env:
24+
PUPPET_GEM_VERSION: '~> 7.24'
25+
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' # why is this set?
26+
27+
steps:
28+
29+
- name: "Checkout"
30+
uses: "actions/checkout@v3"
31+
32+
- name: "Setup ruby"
33+
uses: "ruby/setup-ruby@v1"
34+
with:
35+
ruby-version: "2.7"
36+
bundler-cache: true
37+
38+
- name: "Bundle environment"
39+
run: |
40+
echo ::group::bundler environment
41+
bundle env
42+
echo ::endgroup::
43+
44+
- name: "Provision environment"
45+
run: |
46+
bundle exec rake "litmus:provision[docker,litmusimage/centos:8]"
47+
# Redact password
48+
FILE='spec/fixtures/litmus_inventory.yaml'
49+
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
50+
51+
- name: "Install Puppet agent"
52+
run: |
53+
bundle exec rake 'litmus:install_agent[puppet7]'
54+
55+
- name: "Install module"
56+
run: |
57+
bundle exec rake 'litmus:install_module'
58+
59+
- name: "Run acceptance tests"
60+
run: |
61+
bundle exec rake 'litmus:acceptance:parallel'
62+
63+
- name: "Remove test environment"
64+
if: ${{ always() }}
65+
continue-on-error: true
66+
run: |
67+
if [[ -f spec/fixtures/litmus_inventory.yaml ]]; then
68+
bundle exec rake 'litmus:tear_down'
69+
fi

spec/spec_helper_acceptance_local.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def postgresql_version
7171

7272
def psql(psql_cmd, user = 'postgres', exit_codes = [0, 1], &block)
7373
psql = "psql #{psql_cmd}"
74-
LitmusHelper.instance.run_shell("cd /tmp; su #{shellescape(user)} -c #{shellescape(psql)}", acceptable_exit_codes: exit_codes, &block)
74+
LitmusHelper.instance.run_shell("cd /tmp; su #{shellescape(user)} -c $'#{psql.dup.gsub!('\'', '\\\'')}'", acceptable_exit_codes: exit_codes, &block)
7575
end
7676

7777
def shellescape(str)

0 commit comments

Comments
 (0)