Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
78d857a3
Commit
78d857a3
authored
Oct 31, 2015
by
Dipen Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugged startupshutdown.go
parent
19148eba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
config/setup/startupshutdown_test.go
config/setup/startupshutdown_test.go
+2
-2
No files found.
config/setup/startupshutdown_test.go
View file @
78d857a3
...
@@ -22,7 +22,7 @@ func TestStartup(t *testing.T) {
...
@@ -22,7 +22,7 @@ func TestStartup(t *testing.T) {
testDir
:=
filepath
.
Join
(
tempDirPath
,
"temp_dir_for_testing_startupshutdown.go"
)
testDir
:=
filepath
.
Join
(
tempDirPath
,
"temp_dir_for_testing_startupshutdown.go"
)
osSenitiveTestDir
:=
filepath
.
FromSlash
(
testDir
)
osSenitiveTestDir
:=
filepath
.
FromSlash
(
testDir
)
exec
.
Command
(
"rm"
,
"-r"
,
osSenitiveTestDir
)
.
Start
()
// removes osSenitiveTestDir from the OS's temp directory, if the osSenitiveTestDir already exists
exec
.
Command
(
"rm"
,
"-r"
,
osSenitiveTestDir
)
.
Run
()
// removes osSenitiveTestDir from the OS's temp directory, if the osSenitiveTestDir already exists
tests
:=
[]
struct
{
tests
:=
[]
struct
{
input
string
input
string
...
@@ -33,7 +33,7 @@ func TestStartup(t *testing.T) {
...
@@ -33,7 +33,7 @@ func TestStartup(t *testing.T) {
{
"startup mkdir "
+
osSenitiveTestDir
,
false
,
false
},
{
"startup mkdir "
+
osSenitiveTestDir
,
false
,
false
},
// test case #1 tests proper functionality of non-blocking commands
// test case #1 tests proper functionality of non-blocking commands
{
"startup mkdir "
+
osSenitiveTestDir
,
false
,
true
},
{
"startup mkdir "
+
osSenitiveTestDir
+
" &"
,
false
,
true
},
// test case #2 tests handling of non-existant commands
// test case #2 tests handling of non-existant commands
{
"startup "
+
strconv
.
Itoa
(
int
(
time
.
Now
()
.
UnixNano
())),
true
,
true
},
{
"startup "
+
strconv
.
Itoa
(
int
(
time
.
Now
()
.
UnixNano
())),
true
,
true
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment