Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
faac0ee4
Commit
faac0ee4
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
tests: fix go.mod filename in artifacts
parent
69cf9d30
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/manager/gomod/artifacts.spec.js
+4
-6
4 additions, 6 deletions
test/manager/gomod/artifacts.spec.js
with
4 additions
and
6 deletions
test/manager/gomod/artifacts.spec.js
+
4
−
6
View file @
faac0ee4
...
@@ -14,7 +14,7 @@ describe('.getArtifacts()', () => {
...
@@ -14,7 +14,7 @@ describe('.getArtifacts()', () => {
jest
.
resetAllMocks
();
jest
.
resetAllMocks
();
});
});
it
(
'
returns if no go.sum found
'
,
async
()
=>
{
it
(
'
returns if no go.sum found
'
,
async
()
=>
{
expect
(
await
gomod
.
getArtifacts
(
'
gomod
.json
'
,
[],
'
{}
'
,
config
)).
toBeNull
();
expect
(
await
gomod
.
getArtifacts
(
'
go
.
mod
'
,
[],
'
{}
'
,
config
)).
toBeNull
();
});
});
it
(
'
returns null if unchanged
'
,
async
()
=>
{
it
(
'
returns null if unchanged
'
,
async
()
=>
{
platform
.
getFile
.
mockReturnValueOnce
(
'
Current go.sum
'
);
platform
.
getFile
.
mockReturnValueOnce
(
'
Current go.sum
'
);
...
@@ -23,7 +23,7 @@ describe('.getArtifacts()', () => {
...
@@ -23,7 +23,7 @@ describe('.getArtifacts()', () => {
stderror
:
''
,
stderror
:
''
,
});
});
fs
.
readFile
=
jest
.
fn
(()
=>
'
Current go.sum
'
);
fs
.
readFile
=
jest
.
fn
(()
=>
'
Current go.sum
'
);
expect
(
await
gomod
.
getArtifacts
(
'
gomod
.json
'
,
[],
'
{}
'
,
config
)).
toBeNull
();
expect
(
await
gomod
.
getArtifacts
(
'
go
.
mod
'
,
[],
'
{}
'
,
config
)).
toBeNull
();
});
});
it
(
'
returns updated go.sum
'
,
async
()
=>
{
it
(
'
returns updated go.sum
'
,
async
()
=>
{
platform
.
getFile
.
mockReturnValueOnce
(
'
Current go.sum
'
);
platform
.
getFile
.
mockReturnValueOnce
(
'
Current go.sum
'
);
...
@@ -32,9 +32,7 @@ describe('.getArtifacts()', () => {
...
@@ -32,9 +32,7 @@ describe('.getArtifacts()', () => {
stderror
:
''
,
stderror
:
''
,
});
});
fs
.
readFile
=
jest
.
fn
(()
=>
'
New go.sum
'
);
fs
.
readFile
=
jest
.
fn
(()
=>
'
New go.sum
'
);
expect
(
expect
(
await
gomod
.
getArtifacts
(
'
go.mod
'
,
[],
'
{}
'
,
config
)).
not
.
toBeNull
();
await
gomod
.
getArtifacts
(
'
gomod.json
'
,
[],
'
{}
'
,
config
)
).
not
.
toBeNull
();
});
});
it
(
'
supports docker mode
'
,
async
()
=>
{
it
(
'
supports docker mode
'
,
async
()
=>
{
platform
.
getFile
.
mockReturnValueOnce
(
'
Current go.sum
'
);
platform
.
getFile
.
mockReturnValueOnce
(
'
Current go.sum
'
);
...
@@ -44,7 +42,7 @@ describe('.getArtifacts()', () => {
...
@@ -44,7 +42,7 @@ describe('.getArtifacts()', () => {
});
});
fs
.
readFile
=
jest
.
fn
(()
=>
'
New go.sum
'
);
fs
.
readFile
=
jest
.
fn
(()
=>
'
New go.sum
'
);
expect
(
expect
(
await
gomod
.
getArtifacts
(
'
gomod
.json
'
,
[],
'
{}
'
,
{
await
gomod
.
getArtifacts
(
'
go
.
mod
'
,
[],
'
{}
'
,
{
...
config
,
...
config
,
binarySource
:
'
docker
'
,
binarySource
:
'
docker
'
,
})
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment