<commit_before>require 'spec_helper_acceptance'

# These tests ensure that postgres can change itself to an alternative pgdata
# location properly.

# Allow postgresql to use /tmp/* as a datadir
if fact('osfamily') == 'RedHat' and fact('selinux') == true
  shell 'setenforce 0'
end

describe 'postgres::server', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
  it 'on an alternative pgdata location' do
    pp = <<-EOS
      #file { '/var/lib/pgsql': ensure => directory, } ->
      # needs_initdb will be true by default for all OS's except Debian<commit_msg>Fix acceptance tests for EL<commit_after>require 'spec_helper_acceptance'

# These tests ensure that postgres can change itself to an alternative pgdata
# location properly.

# Allow postgresql to use /tmp/* as a datadir
if fact('osfamily') == 'RedHat' and fact('selinux') == 'true'
  shell 'setenforce 0'
end

describe 'postgres::server', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
  it 'on an alternative pgdata location' do
    pp = <<-EOS
      #file { '/var/lib/pgsql': ensure => directory, } ->
      # needs_initdb will be true by default for all OS's except Debian
{'fraction_non_alphanumeric': 0.11472602739726027, 'fraction_numerical': 0.0017123287671232876, 'mean_word_length': 4.387096774193548, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2130529', 'n_tokens_mistral': 373, 'n_tokens_neox': 362, 'n_words': 129}