From 72df887f65ff86590d59cb6af2fffbbbe1dc280d Mon Sep 17 00:00:00 2001 From: Jeremy Clerc Date: Fri, 26 Jan 2024 18:31:07 +0100 Subject: [PATCH] Add plugins installation test --- test/fixtures/cookbooks/nexus3_test/attributes/default.rb | 6 ++++++ test/integration/default/inspec/default_spec.rb | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/test/fixtures/cookbooks/nexus3_test/attributes/default.rb b/test/fixtures/cookbooks/nexus3_test/attributes/default.rb index 2670e8b..94783ba 100644 --- a/test/fixtures/cookbooks/nexus3_test/attributes/default.rb +++ b/test/fixtures/cookbooks/nexus3_test/attributes/default.rb @@ -1,3 +1,9 @@ default['nexus3']['api']['username'] = 'admin' default['nexus3']['api']['password'] = 'admin123' default['nexus3']['api']['endpoint'] = 'http://localhost:8081/service/rest/v1/' + +default['nexus3']['plugins']['repository_cargo']['name'] = 'nexus-repository-cargo' +default['nexus3']['plugins']['repository_cargo']['action'] = 'create' +default['nexus3']['plugins']['repository_cargo']['source'] = 'https://github.com/jeremy-clerc/nexus-repository-cargo/releases/download/' \ + 'v0.0.8/nexus-repository-cargo-0.0.8-bundle.kar' +default['nexus3']['plugins']['repository_cargo']['checksum'] = '8e88aafc8b44eaf9d3ddb4350b943e37379119dab631deb52f3cf027a134b81d' diff --git a/test/integration/default/inspec/default_spec.rb b/test/integration/default/inspec/default_spec.rb index deb4865..800f561 100644 --- a/test/integration/default/inspec/default_spec.rb +++ b/test/integration/default/inspec/default_spec.rb @@ -60,6 +60,11 @@ its('content') { should match(%r{nexus-context-path=/}) } end + describe file('/opt/nexus3/deploy/nexus-repository-cargo-bundle.kar') do + it { should be_file } + it { should be_owned_by 'nexus' } + end + describe user('nexusbar') do it { should exist } its('uid') { should eq 1234 }