Skip to content

Commit

Permalink
(maint) - Re-add acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Sep 28, 2023
1 parent 4515c9d commit 9b9c191
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,31 @@ jobs:
runs_on: ${{ matrix.runs_on }}
rake_task: 'gem_revendor test_languageserver test_languageserver_sidecar test_debugserver'

acceptance:
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
include:
- ruby_version: '2.7'
puppet_version: '~> 7.0'
- ruby_version: '3.2'
puppet_version: '~> 8.0'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'

name: "Acceptance : ${{ matrix.runs_on }} Ruby ${{ matrix.ruby_version }}"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
secrets: "inherit"
with:
ruby_version: ${{ matrix.ruby_version }}
runs_on: ${{ matrix.runs_on }}
rake_task: 'gem_revendor acceptance_languageserver'
puppet_version: ${{ matrix.puppet_version }}

build:
strategy:
fail-fast: false
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,31 @@ jobs:
ruby_version: ${{ matrix.ruby_version }}
runs_on: ${{ matrix.runs_on }}
rake_task: 'gem_revendor test_languageserver test_languageserver_sidecar test_debugserver'

acceptance:
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
include:
- ruby_version: '2.7'
puppet_version: '~> 7.0'
- ruby_version: '3.2'
puppet_version: '~> 8.0'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'

name: "Acceptance : ${{ matrix.runs_on }} Ruby ${{ matrix.ruby_version }}"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
secrets: "inherit"
with:
ruby_version: ${{ matrix.ruby_version }}
runs_on: ${{ matrix.runs_on }}
rake_task: 'gem_revendor acceptance_languageserver'
puppet_version: ${{ matrix.puppet_version }}

build:
strategy:
Expand Down
4 changes: 2 additions & 2 deletions spec/languageserver/acceptance/end_to_end_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def path_to_uri(path)
# Puppet Resource request
@client.clear_messages!
@client.send_data(@client.puppet_getresource_request(@client.next_seq_id, 'user'))
expect(@client).to receive_message_with_request_id_within_timeout([@client.current_seq_id, 15])
expect(@client).to receive_message_with_request_id_within_timeout([@client.current_seq_id, 40])
result = @client.data_from_request_seq_id(@client.current_seq_id)
# Expect something to be returned
expect(result['result']['data']).not_to be_nil
Expand All @@ -158,7 +158,7 @@ def path_to_uri(path)
# Node Graph request
@client.clear_messages!
@client.send_data(@client.puppet_compilenodegraph_request(@client.next_seq_id, manifest_uri))
expect(@client).to receive_message_with_request_id_within_timeout([@client.current_seq_id, 5])
expect(@client).to receive_message_with_request_id_within_timeout([@client.current_seq_id, 40])
result = @client.data_from_request_seq_id(@client.current_seq_id)
# Expect something to be returned
expect(result['result']['edges']).to be_empty
Expand Down

0 comments on commit 9b9c191

Please sign in to comment.