Skip to content

Commit

Permalink
switch tests + docs to Nextcloud 30.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fraenki committed Nov 6, 2024
1 parent 2906cbf commit dbc05a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ A small number of parameters are required to setup Nextcloud:
class { 'nextcloud':
admin_password => 'suPeRseCreT',
db_password => 'secRetPasSwOrd',
version => '20.0.4',
version => '30.0.1',
}
```

Expand Down Expand Up @@ -280,7 +280,7 @@ class { 'nextcloud':
datadir => '/opt/nextcloud-data',
installroot => '/opt',
symlink_name => 'nextcloud',
version => '20.0.4',
version => '30.0.1',
}
```

Expand All @@ -290,9 +290,9 @@ class { 'nextcloud':
```
/
|-- opt/
| |-- nextcloud@ # symlink to the current install dir (nextcloud-20.0.4)
| |-- nextcloud-20.0.3 # install dir for a previous version (will not be purged)
| |-- nextcloud-20.0.4 # install dir for the current version
| |-- nextcloud@ # symlink to the current install dir (nextcloud-30.0.1)
| |-- nextcloud-30.0.0 # install dir for a previous version (will not be purged)
| |-- nextcloud-30.0.1 # install dir for the current version
| | |-- nextcloud # default application folder (extracted from dist archive)
| | |-- config
| | |-- config.php@ # symlink to the real config.php in Nextcloud's data dir
Expand All @@ -302,16 +302,16 @@ class { 'nextcloud':
| |-- .puppet_convert_filecache.done # indicates that Puppet completed the "convert filecache" command
| |-- .puppet_dist_initial_install.done # indicates that the initial install of Nextcloud is done
| |-- .puppet_missing_indices.done # indicates that Puppet completed the "missing indices" command
| |-- .puppet_update_20.0.3.done # indicates that an update to version 20.0.3 was performed
| |-- .puppet_update_20.0.4.done # indicates that an update to version 20.0.4 was performed
| |-- .puppet_update_30.0.0.done # indicates that an update to version 30.0.0 was performed
| |-- .puppet_update_30.0.1.done # indicates that an update to version 30.0.1 was performed
|-- var/
| |-- db/
| |-- nextcloud_data # contains the path to Nextcloud's data dir (used by custom fact)
| |-- nextcloud_home # contains the path to Nextcloud's install/home dir (used by custom fact)
```

In this example, Nextcloud was initially installed with version 20.0.3 and later updated to version 20.0.4.
In this example, Nextcloud was initially installed with version 30.0.0 and later updated to version 30.0.1.

The suffix `.done` indicates that this file is used by the module to identify completed jobs.

Expand All @@ -332,8 +332,3 @@ Please use the GitHub issues functionality to report any bugs or requests for ne
### Acknowledgement

This module was heavily inspired by [adullact/nextcloud](https://forge.puppet.com/modules/adullact/nextcloud), which was written by Fabien Combernous. Many features would not be available without his hard work.

## License

Copyright 2020 Frank Wall

2 changes: 1 addition & 1 deletion spec/acceptance/nextcloud_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class { 'nextcloud':
system_user => 'nobody',
# The post-update command would break the idempotency test.
update_enabled => 'none',
version => '24.0.6',
version => '30.0.1',
}
EOS

Expand Down
16 changes: 8 additions & 8 deletions spec/classes/nextcloud_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
admin_password: 'secret',
db_password: 'secret',
version: '20.0.4',
version: '30.0.1',
}
end

Expand Down Expand Up @@ -44,23 +44,23 @@
admin_password: 'secret',
db_password: 'secret',
update_host: 'DOES_NOT_MATCH_FQDN',
version: '20.0.4',
version: '30.0.1',
}
end

it { is_expected.to compile }

it { is_expected.not_to contain_nextcloud__install__distribution('initial install') }
it { is_expected.not_to contain_file('Create install dir: initial install').with_ensure('directory') }
it { is_expected.not_to contain_archive('Extract archive: update to 20.0.4') }
it { is_expected.not_to contain_archive('Extract archive: update to 30.0.1') }
end
context 'when install_enabled=false' do
let(:params) do
{
admin_password: 'secret',
db_password: 'secret',
install_enabled: false,
version: '20.0.4',
version: '30.0.1',
}
end

Expand All @@ -69,8 +69,8 @@
it { is_expected.not_to contain_nextcloud__install__distribution('initial install') }
it { is_expected.not_to contain_file('Create install dir: initial install').with_ensure('directory') }

it { is_expected.not_to contain_nextcloud__install__distribution('update to 20.0.4') }
it { is_expected.not_to contain_archive('Extract archive: update to 20.0.4') }
it { is_expected.not_to contain_nextcloud__install__distribution('update to 30.0.1') }
it { is_expected.not_to contain_archive('Extract archive: update to 30.0.1') }
it { is_expected.not_to contain_exec('occ upgrade') }
end
context 'when update_enabled=false' do
Expand All @@ -79,15 +79,15 @@
admin_password: 'secret',
db_password: 'secret',
update_enabled: false,
version: '20.0.4',
version: '30.0.1',
}
end

it { is_expected.to compile }

it { is_expected.to contain_nextcloud__install__distribution('initial install') }
it { is_expected.to contain_file('Create install dir: initial install').with_ensure('directory') }
it { is_expected.to contain_nextcloud__install__distribution('update to 20.0.4') }
it { is_expected.to contain_nextcloud__install__distribution('update to 30.0.1') }

it { is_expected.not_to contain_exec('occ upgrade') }
end
Expand Down

0 comments on commit dbc05a5

Please sign in to comment.