Example #1
0
func TestGetConnRefused(t *testing.T) {
	*util.StorageBaseURL = "http://localhost:0"
	defer func() {
		*util.StorageBaseURL = baseURL
	}()

	_, err := Get("1/2/3", 0)
	assert.Error(t, err)
}
Example #2
0
func TestPut(t *testing.T) {
	requestURI, _ := setup()
	if requestURI == "" {
		t.Skip("No PUT URL supplied")
	}

	reader := strings.NewReader("hello")
	err := Put(requestURI, reader)
	assert.Error(t, err)
}