From 119d9d03841ad82fb034b26cac3f370324709f39 Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Wed, 27 Sep 2023 13:37:19 +0100 Subject: [PATCH] (maint) - Re-add acceptance tests --- .github/workflows/ci.yml | 25 +++++++++++++++++++ .github/workflows/nightly.yml | 25 +++++++++++++++++++ .../acceptance/end_to_end_spec.rb | 4 +-- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8f909db..41145d88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 02f1c2f1..b3dd5667 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,6 +26,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 diff --git a/spec/languageserver/acceptance/end_to_end_spec.rb b/spec/languageserver/acceptance/end_to_end_spec.rb index 8289cd07..7df0aff5 100644 --- a/spec/languageserver/acceptance/end_to_end_spec.rb +++ b/spec/languageserver/acceptance/end_to_end_spec.rb @@ -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, 25]) result = @client.data_from_request_seq_id(@client.current_seq_id) # Expect something to be returned expect(result['result']['data']).not_to be_nil @@ -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, 25]) result = @client.data_from_request_seq_id(@client.current_seq_id) # Expect something to be returned expect(result['result']['edges']).to be_empty