Skip to content

Commit

Permalink
Do not reuse the same name for user and group
Browse files Browse the repository at this point in the history
windows is such a supperior operating system it cannot create a group if
a user with the same name already exist.

We used `vagrant` for no real reason, so switch to obviously example
names to fix CI on windows.

While here, fix a few typos.
  • Loading branch information
smortex committed Apr 11, 2024
1 parent a32a229 commit 85d4b0a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions spec/acceptance/clone_repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
end
end

context 'with with shallow clone' do
context 'with shallow clone' do
pp = <<-MANIFEST
vcsrepo { "#{tmpdir}/testrepo_shallow":
ensure => present,
Expand Down Expand Up @@ -212,9 +212,9 @@
end
end

context 'with with an owner' do
context 'with an owner' do
pp = <<-MANIFEST
user { 'vagrant':
user { 'customowner':
ensure => present,
password => if ($facts['os']['family'] == 'windows') { 'CorrectHorseBatteryStaple0!' },
}
Expand All @@ -226,7 +226,7 @@
ensure => present,
provider => git,
source => "file://#{tmpdir}/testrepo.git",
owner => 'vagrant',
owner => 'customowner',
safe_directory => true,
}
MANIFEST
Expand All @@ -237,7 +237,7 @@

describe file("#{tmpdir}/testrepo_owner") do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'vagrant' }
it { is_expected.to be_owned_by 'customowner' }
end

describe file('/etc/gitconfig') do
Expand All @@ -247,9 +247,9 @@
end
end

context 'with with a group' do
context 'with a group' do
pp = <<-MANIFEST
group { 'vagrant':
group { 'customgroup':
ensure => present,
}
MANIFEST
Expand All @@ -261,7 +261,7 @@
ensure => present,
provider => git,
source => "file://#{tmpdir}/testrepo.git",
group => 'vagrant',
group => 'customgroup',
}
MANIFEST
it 'clones a repo' do
Expand All @@ -271,11 +271,11 @@

describe file("#{tmpdir}/testrepo_group") do
it { is_expected.to be_directory }
it { is_expected.to be_grouped_into 'vagrant' }
it { is_expected.to be_grouped_into 'customgroup' }
end
end

context 'with with excludes' do
context 'with excludes' do
pp = <<-MANIFEST
vcsrepo { "#{tmpdir}/testrepo_excludes":
ensure => present,
Expand All @@ -302,7 +302,7 @@
end
end

context 'with with force' do
context 'with force' do
before(:all) do
run_shell("mkdir -p #{tmpdir}/testrepo_force/folder")
run_shell("touch #{tmpdir}/testrepo_force/temp.txt")
Expand Down

0 comments on commit 85d4b0a

Please sign in to comment.