Skip to content

Commit

Permalink
format test data for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
LongLiveCHIEF committed Nov 27, 2020
1 parent a2c8d24 commit f74d249
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions __tests__/__data__/taggingStrategy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
// [expected output, object passed to taggingStrategy function]
exports.scenarios = [
['1,1.0,1.0.0',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0'}],
['foo/bar:1,foo/bar:1.0,foo/bar:1.0.0',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', imageName: 'foo/bar'}],
['foo/bar:1,foo/bar:1.0,foo/bar:1.0.0,foo/bar:latest',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', imageName: 'foo/bar', latest: true}],
['1,1.0,1.0.0,latest',{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', latest: true}],
['1-foobar,1.0-foobar,1.0.0-foobar',{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0'}],
['1-foobar,1.0-foobar,1.0.0-foobar,latest',{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0', latest: true}],
['hello/world:1-foobar,hello/world:1.0-foobar,hello/world:1.0.0-foobar,hello/world:latest',{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0', latest: true, imageName: 'hello/world'}],
[
'1,1.0,1.0.0',
{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0'}
],
[
'foo/bar:1,foo/bar:1.0,foo/bar:1.0.0',
{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', imageName: 'foo/bar'}
],
[
'foo/bar:1,foo/bar:1.0,foo/bar:1.0.0,foo/bar:latest',
{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', imageName: 'foo/bar', latest: true}
],
[
'1,1.0,1.0.0,latest',
{inputTags:'%X%,%X.Y%,%X.Y.Z%', tagName:'1.0.0', latest: true}
],
[
'1-foobar,1.0-foobar,1.0.0-foobar',
{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0'}
],
[
'1-foobar,1.0-foobar,1.0.0-foobar,latest',{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0', latest: true}
],
[
'hello/world:1-foobar,hello/world:1.0-foobar,hello/world:1.0.0-foobar,hello/world:latest',
{inputTags:'%X%-foobar,%X.Y%-foobar,%X.Y.Z%-foobar', tagName:'1.0.0', latest: true, imageName: 'hello/world'}
],
]

0 comments on commit f74d249

Please sign in to comment.