Compare commits
1 Commits
2381e522e7
...
7218f309de
Author | SHA1 | Date | |
---|---|---|---|
7218f309de |
@ -75,6 +75,7 @@ func Clone(dir, url string) error {
|
||||
log.Debugf("git clone: %s already exists", dir)
|
||||
}
|
||||
|
||||
fmt.Println("FOOOOO")
|
||||
close(waitCh)
|
||||
}()
|
||||
|
||||
|
@ -12,8 +12,11 @@ import (
|
||||
)
|
||||
|
||||
func TestCancelGitClone(t *testing.T) {
|
||||
dir := path.Join(config.RECIPES_DIR, "gitea")
|
||||
os.RemoveAll(dir)
|
||||
|
||||
go func() {
|
||||
time.Sleep(time.Second * 1)
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
p, err := os.FindProcess(os.Getpid())
|
||||
if err != nil {
|
||||
@ -24,8 +27,6 @@ func TestCancelGitClone(t *testing.T) {
|
||||
}()
|
||||
|
||||
gitURL := fmt.Sprintf("%s/%s.git", config.REPOS_BASE_URL, "gitea")
|
||||
dir := path.Join(config.RECIPES_DIR, "gitea")
|
||||
|
||||
if err := Clone(dir, gitURL); err == nil {
|
||||
t.Fatal("cloning should have been interrupted")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user