Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.
/ gitest Public archive

A mock GIT server for running git clone in your app's tests without relying on the network

License

Notifications You must be signed in to change notification settings

dmathieu/gitest

Repository files navigation

Gitest

Build Status

A mock GIT server for running git clone in your app's tests without relying on the network

Usage

server, err := gitest.NewServer("basic")
if err != nil {
  log.Fatalf(err)
}
defer server.Close()

tempDir, err := ioutil.TempDir("", "git_repository")
if err != nil {
  log.Fatalf(err)
}

c := exec.Command("git", "clone", fmt.Sprintf("%s/%s.git", server.URL, server.ValidRepo), tempDir)
err = c.Run()
if err != nil {
  log.Fatalf(err)
}

About

A mock GIT server for running git clone in your app's tests without relying on the network

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published