func TestNewImageFromURLErrorWithCrapFile(t *testing.T) { ts := httptest.NewServer(http.FileServer(http.Dir("."))) defer ts.Close() _, err := chrootly.NewImageFromURL(ts.URL + "/crap_image.tar") assert.NotNil(t, err) }
func TestNewImageFromURL(t *testing.T) { ts := httptest.NewServer(http.FileServer(http.Dir("."))) defer ts.Close() image, _ := chrootly.NewImageFromURL(ts.URL + "/test_image.tar") assert.NotNil(t, image) assertImageSetup(t, image.Directory) }
func TestNewImageFromURLErrorWithCrapURL(t *testing.T) { _, err := chrootly.NewImageFromURL("jabberwocky") assert.NotNil(t, err) }