Skip to content

Commit aa0467b

Browse files
author
jordanbreen28
committed
Further acceptance test fix
1 parent 396a83e commit aa0467b

File tree

5 files changed

+44
-38
lines changed

5 files changed

+44
-38
lines changed

.github/workflows/nightly.yml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,13 @@ env:
1111

1212
jobs:
1313
setup_matrix:
14-
if: ${{ github.repository_owner == 'puppetlabs' }}
1514
name: "Setup Test Matrix"
1615
runs-on: ubuntu-20.04
1716
outputs:
1817
matrix: ${{ steps.get-matrix.outputs.matrix }}
1918

2019
steps:
2120

22-
- name: "Connect to twingate"
23-
uses: twingate/github-action@v1
24-
with:
25-
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
26-
2721
- name: "Honeycomb: Start recording"
2822
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
2923
with:
@@ -35,6 +29,7 @@ jobs:
3529
run: |
3630
echo STEP_ID=setup-environment >> $GITHUB_ENV
3731
echo STEP_START=$(date +%s) >> $GITHUB_ENV
32+
3833
- name: Checkout Source
3934
uses: actions/checkout@v2
4035
if: ${{ github.repository_owner == 'puppetlabs' }}
@@ -52,31 +47,33 @@ jobs:
5247
echo ::group::bundler environment
5348
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
5449
echo ::endgroup::
55-
50+
5651
- name: "Honeycomb: Record Setup Environment time"
5752
if: ${{ github.repository_owner == 'puppetlabs' }}
5853
run: |
5954
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
6055
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
6156
echo STEP_START=$(date +%s) >> $GITHUB_ENV
57+
6258
- name: Setup Acceptance Test Matrix
6359
id: get-matrix
64-
if: ${{ github.repository_owner == 'puppetlabs' }}
6560
run: |
6661
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
67-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
62+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
6863
else
6964
echo "::set-output name=matrix::{}"
7065
fi
71-
66+
7267
- name: "Honeycomb: Record Setup Test Matrix time"
7368
if: ${{ always() }}
7469
run: |
7570
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
71+
7672
Acceptance:
7773
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
7874
needs:
7975
- setup_matrix
76+
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
8077

8178
runs-on: ubuntu-20.04
8279
strategy:
@@ -92,7 +89,6 @@ jobs:
9289
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
9390
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
9491
95-
9692
- name: "Honeycomb: Start recording"
9793
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9894
with:
@@ -130,7 +126,12 @@ jobs:
130126
131127
- name: Provision test environment
132128
run: |
133-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
129+
if [[ "${{matrix.platforms.provider}}" == "provision::docker" ]]; then
130+
DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}"
131+
else
132+
DOCKER_RUN_OPTS=''
133+
fi
134+
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]"
134135
echo ::group::=== REQUEST ===
135136
cat request.json || true
136137
echo
@@ -154,6 +155,20 @@ jobs:
154155
run: |
155156
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
156157
158+
- uses: twingate/github-action@v1
159+
with:
160+
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
161+
162+
- name: Download OS ISO
163+
run: |
164+
bundle exec bolt command run "cd C:\\; Invoke-WebRequest -Uri https://artifactory.delivery.puppetlabs.net/artifactory/generic__iso/iso/windows/en_windows_server_2019_updated_july_2020_x64_dvd_94453821.iso -UseBasicParsing" \
165+
--targets winrm_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml
166+
167+
- name: Download SQLServer ISO
168+
run: |
169+
bundle exec bolt command run "cd C:\\; Invoke-WebRequest -Uri https://artifactory.delivery.puppetlabs.net/artifactory/generic__iso/iso/SQLServer/SQLServer2019CTP2.4-x64-ENU.iso -UseBasicParsing" \
170+
--targets winrm_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml
171+
157172
- name: "Honeycomb: Record deployment times"
158173
if: ${{ always() }}
159174
run: |
@@ -190,20 +205,3 @@ jobs:
190205
if: ${{ always() }}
191206
run: |
192207
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
193-
194-
slack-workflow-status:
195-
if: ${{ github.repository_owner == 'puppetlabs' }}
196-
name: Post Workflow Status To Slack
197-
needs:
198-
- Acceptance
199-
runs-on: ubuntu-20.04
200-
steps:
201-
- name: Slack Workflow Notification
202-
uses: puppetlabs/Gamesight-slack-workflow-status@pdk-templates-v1
203-
with:
204-
# Required Input
205-
repo_token: ${{ secrets.GITHUB_TOKEN }}
206-
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
207-
# Optional Input
208-
channel: '#team-cat-bots'
209-
name: 'GABot'

.github/workflows/pr_test.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ jobs:
1414
matrix: ${{ steps.get-matrix.outputs.matrix }}
1515

1616
steps:
17-
18-
- name: "Connect to twingate"
19-
uses: twingate/github-action@v1
20-
with:
21-
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
2217

2318
- name: "Honeycomb: Start recording"
2419
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
@@ -157,6 +152,20 @@ jobs:
157152
run: |
158153
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
159154
155+
- uses: twingate/github-action@v1
156+
with:
157+
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
158+
159+
# - name: Download OS ISO
160+
# run: |
161+
# bundle exec bolt command run "cd C:\\; Invoke-WebRequest -Uri https://artifactory.delivery.puppetlabs.net/artifactory/generic__iso/iso/windows/en_windows_server_2019_updated_july_2020_x64_dvd_94453821.iso -UseBasicParsing" \
162+
# --targets winrm_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml
163+
164+
- name: Download SQLServer ISO
165+
run: |
166+
bundle exec bolt command run "cd C:\\; gsutil cp gs://artifactory-modules/puppetlabs-sqlserver/SQLServer2019CTP2.4-x64-ENU.iso C:\" \
167+
--targets winrm_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml
168+
160169
- name: "Honeycomb: Record deployment times"
161170
if: ${{ always() }}
162171
run: |

spec/acceptance/sqlserver_config_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def ensure_sqlserver_instance(inst_name, ensure_val = 'present')
5454
instance => '#{inst_name}',
5555
login_type => 'SQL_LOGIN',
5656
login => '#{@admin_user}',
57-
password => Sensitive('#{@admin_pass}'),
57+
password => '#{@admin_pass}',
5858
svrroles => {'sysadmin' => 1},
5959
}
6060
MANIFEST

spec/acceptance/sqlserver_instance_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def sql_query_is_user_sysadmin(username)
8585
end
8686
end
8787

88-
it "#{inst_name} instance has Administrator as a sysadmin" do
89-
run_sql_query(run_sql_query_opts(inst_name, sql_query_is_user_sysadmin('Administrator'), 1))
88+
it "#{inst_name} instance has vagrant as an Administrator" do
89+
run_sql_query(run_sql_query_opts(inst_name, sql_query_is_user_sysadmin('vagrant'), 1))
9090
end
9191

9292
it "#{inst_name} instance has ExtraSQLAdmin as a sysadmin" do

spec/acceptance/z_last_sqlserver_features_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def bind_and_apply_failing_manifest(features, ensure_val = 'present')
3838
ensure => #{ensure_val},
3939
source => 'H:',
4040
is_svc_account => "#{hostname}\\\\vagrant",
41-
is_svc_password => 'vagrant',
4241
features => #{features},
4342
}
4443
MANIFEST

0 commit comments

Comments
 (0)