good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
448abb61
Commit
448abb61
authored
Nov 16, 2017
by
Anton Evangelatov
Browse files
Options
Downloads
Patches
Plain Diff
accounts/keystore: change modtime for test cases to be bigger than 1sec.
parent
5aa3eac2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
accounts/keystore/account_cache_test.go
+8
-1
8 additions, 1 deletion
accounts/keystore/account_cache_test.go
with
8 additions
and
1 deletion
accounts/keystore/account_cache_test.go
+
8
−
1
View file @
448abb61
...
@@ -59,7 +59,7 @@ func TestWatchNewFile(t *testing.T) {
...
@@ -59,7 +59,7 @@ func TestWatchNewFile(t *testing.T) {
// Ensure the watcher is started before adding any files.
// Ensure the watcher is started before adding any files.
ks
.
Accounts
()
ks
.
Accounts
()
time
.
Sleep
(
2
00
*
time
.
Millisecond
)
time
.
Sleep
(
10
00
*
time
.
Millisecond
)
// Move in the files.
// Move in the files.
wantAccounts
:=
make
([]
accounts
.
Account
,
len
(
cachetestAccounts
))
wantAccounts
:=
make
([]
accounts
.
Account
,
len
(
cachetestAccounts
))
...
@@ -349,6 +349,8 @@ func TestUpdatedKeyfileContents(t *testing.T) {
...
@@ -349,6 +349,8 @@ func TestUpdatedKeyfileContents(t *testing.T) {
return
return
}
}
time
.
Sleep
(
1000
*
time
.
Millisecond
)
// Now replace file contents
// Now replace file contents
if
err
:=
forceCopyFile
(
file
,
cachetestAccounts
[
1
]
.
URL
.
Path
);
err
!=
nil
{
if
err
:=
forceCopyFile
(
file
,
cachetestAccounts
[
1
]
.
URL
.
Path
);
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
...
@@ -362,6 +364,8 @@ func TestUpdatedKeyfileContents(t *testing.T) {
...
@@ -362,6 +364,8 @@ func TestUpdatedKeyfileContents(t *testing.T) {
return
return
}
}
time
.
Sleep
(
1000
*
time
.
Millisecond
)
// Now replace file contents again
// Now replace file contents again
if
err
:=
forceCopyFile
(
file
,
cachetestAccounts
[
2
]
.
URL
.
Path
);
err
!=
nil
{
if
err
:=
forceCopyFile
(
file
,
cachetestAccounts
[
2
]
.
URL
.
Path
);
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
...
@@ -374,6 +378,9 @@ func TestUpdatedKeyfileContents(t *testing.T) {
...
@@ -374,6 +378,9 @@ func TestUpdatedKeyfileContents(t *testing.T) {
t
.
Error
(
err
)
t
.
Error
(
err
)
return
return
}
}
time
.
Sleep
(
1000
*
time
.
Millisecond
)
// Now replace file contents with crap
// Now replace file contents with crap
if
err
:=
ioutil
.
WriteFile
(
file
,
[]
byte
(
"foo"
),
0644
);
err
!=
nil
{
if
err
:=
ioutil
.
WriteFile
(
file
,
[]
byte
(
"foo"
),
0644
);
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
...
...
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