Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391262
artifactory_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
artifactory_spec.rb
View Options
require
'spec_helper'
require
'shared_contexts'
describe
'archive::artifactory'
do
let!
(
:artifactory_sha1
)
do
MockFunction
.
new
(
'artifactory_sha1'
)
do
|
f
|
f
.
stub
.
returns
(
'0d4f4b4b039c10917cfc49f6f6be71e4'
)
end
end
let
(
:facts
)
{{
:osfamily
=>
'RedHat'
,
:puppetversion
=>
'3.7.3'
}}
context
'artifactory archive with defaults'
do
let
(
:title
)
{
'/opt/app/example.zip'
}
let
(
:params
)
{{
:server
=>
'home.lan'
,
:port
=>
'8081'
,
:url_path
=>
'path/example.zip'
}}
it
{
should
contain_archive
(
'/opt/app/example.zip'
)
.
with
({
:path
=>
'/opt/app/example.zip'
,
:source
=>
'http://home.lan:8081/artifactory/path/example.zip'
,
:checksum
=>
'0d4f4b4b039c10917cfc49f6f6be71e4'
,
:checksum_type
=>
'sha1'
,
})
}
it
{
should
contain_file
(
'/opt/app/example.zip'
)
.
with
({
:owner
=>
'0'
,
:group
=>
'0'
,
:mode
=>
'0640'
,
:require
=>
'Archive[/opt/app/example.zip]'
,
})
}
end
context
'artifactory archive with path'
do
let
(
:title
)
{
'example.zip'
}
let
(
:params
)
{{
:archive_path
=>
'/opt/app'
,
:server
=>
'home.lan'
,
:port
=>
'8081'
,
:url_path
=>
'path/example.zip'
,
:owner
=>
'app'
,
:group
=>
'app'
,
:mode
=>
'0400'
,
}}
it
{
should
contain_archive
(
'example.zip'
)
.
with
({
:path
=>
'/opt/app/example.zip'
,
:source
=>
'http://home.lan:8081/artifactory/path/example.zip'
,
:checksum
=>
'0d4f4b4b039c10917cfc49f6f6be71e4'
,
:checksum_type
=>
'sha1'
,
})
}
it
{
should
contain_file
(
'/opt/app/example.zip'
)
.
with
({
:owner
=>
'app'
,
:group
=>
'app'
,
:mode
=>
'0400'
,
:require
=>
'Archive[example.zip]'
,
})
}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 6:41 PM (14 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3377701
Attached To
R144 puppet-puppet-archive
Event Timeline
Log In to Comment