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
04fd4de9
"manifests/prometheusOperator-clusterRole.yaml" did not exist on "1dd5bbeb584c70ec708d56b9f4ae2742566cccc0"
Unverified
Commit
04fd4de9
authored
3 years ago
by
Michael Kriese
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
test: fix macos terraform tests (#11204)
parent
fa2317ed
No related branches found
Branches containing commit
Tags
35.124.0
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/manager/terraform/lockfile/hash.spec.ts
+2
-4
2 additions, 4 deletions
lib/manager/terraform/lockfile/hash.spec.ts
lib/manager/terraform/lockfile/hash.ts
+2
-7
2 additions, 7 deletions
lib/manager/terraform/lockfile/hash.ts
with
4 additions
and
11 deletions
lib/manager/terraform/lockfile/hash.spec.ts
+
2
−
4
View file @
04fd4de9
...
@@ -20,14 +20,12 @@ const log = logger.logger as jest.Mocked<Logger>;
...
@@ -20,14 +20,12 @@ const log = logger.logger as jest.Mocked<Logger>;
describe
(
getName
(),
()
=>
{
describe
(
getName
(),
()
=>
{
let
cacheDir
:
DirectoryResult
;
let
cacheDir
:
DirectoryResult
;
before
All
(
async
()
=>
{
before
Each
(
async
()
=>
{
cacheDir
=
await
dir
({
unsafeCleanup
:
true
});
cacheDir
=
await
dir
({
unsafeCleanup
:
true
});
setAdminConfig
({
cacheDir
:
cacheDir
.
path
});
setAdminConfig
({
cacheDir
:
cacheDir
.
path
});
});
});
beforeEach
(()
=>
jest
.
resetAllMocks
());
afterEach
(()
=>
cacheDir
.
cleanup
());
afterAll
(()
=>
cacheDir
.
cleanup
());
it
(
'
returns null if getBuilds returns null
'
,
async
()
=>
{
it
(
'
returns null if getBuilds returns null
'
,
async
()
=>
{
httpMock
httpMock
...
...
This diff is collapsed.
Click to expand it.
lib/manager/terraform/lockfile/hash.ts
+
2
−
7
View file @
04fd4de9
...
@@ -27,9 +27,7 @@ export class TerraformProviderHash {
...
@@ -27,9 +27,7 @@ export class TerraformProviderHash {
// a sha256sum displayed as lowercase hex string to root hash
// a sha256sum displayed as lowercase hex string to root hash
const
fileBuffer
=
await
fs
.
readFile
(
file
);
const
fileBuffer
=
await
fs
.
readFile
(
file
);
hash
.
update
(
fileBuffer
);
hash
.
update
(
fileBuffer
);
hash
.
end
();
rootHash
.
update
(
hash
.
digest
(
'
hex
'
));
const
data
=
hash
.
read
();
rootHash
.
update
(
data
.
toString
(
'
hex
'
));
// add double space, the filename and a new line char
// add double space, the filename and a new line char
rootHash
.
update
(
'
'
);
rootHash
.
update
(
'
'
);
...
@@ -38,10 +36,7 @@ export class TerraformProviderHash {
...
@@ -38,10 +36,7 @@ export class TerraformProviderHash {
rootHash
.
update
(
'
\n
'
);
rootHash
.
update
(
'
\n
'
);
}
}
rootHash
.
end
();
return
rootHash
.
digest
(
'
base64
'
);
const
rootData
=
rootHash
.
read
();
const
result
:
string
=
rootData
.
toString
(
'
base64
'
);
return
result
;
}
}
static
async
hashOfZipContent
(
static
async
hashOfZipContent
(
...
...
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