New Upstream Release - golang-gopkg-h2non-gock.v1
Ready changes
Summary
Merged new upstream version: 1.2.0 (was: 1.1.2).
Resulting package
Built on 2022-11-13T06:13 (took 5m3s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases golang-gopkg-h2non-gock.v1-dev
Lintian Result
Diff
diff --git a/History.md b/History.md
index 4329310..6260df6 100644
--- a/History.md
+++ b/History.md
@@ -1,3 +1,7 @@
+## v1.2.0 / 2022-10-19
+
+ * refactor(package): import path changed to github.com/h2non/gock
+
## v1.1.2 / 2021-08-03
* fix(mock): fix race condition in mock.go file (#92)
diff --git a/README.md b/README.md
index a0d38a3..37a835f 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ To get started, take a look to the [examples](#examples).
## Installation
```bash
-go get -u gopkg.in/h2non/gock.v1
+go get -u github.com/h2non/gock
```
## API
@@ -125,11 +125,12 @@ See [examples](https://github.com/h2non/gock/tree/master/_examples) directory fo
package test
import (
- "github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
"io/ioutil"
"net/http"
"testing"
+
+ "github.com/nbio/st"
+ "github.com/h2non/gock"
)
func TestSimple(t *testing.T) {
@@ -158,11 +159,12 @@ func TestSimple(t *testing.T) {
package test
import (
- "github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
"io/ioutil"
"net/http"
"testing"
+
+ "github.com/nbio/st"
+ "github.com/h2non/gock"
)
func TestMatchHeaders(t *testing.T) {
@@ -197,11 +199,12 @@ func TestMatchHeaders(t *testing.T) {
package test
import (
- "github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
"io/ioutil"
"net/http"
"testing"
+
+ "github.com/nbio/st"
+ "github.com/h2non/gock"
)
func TestMatchParams(t *testing.T) {
@@ -233,11 +236,12 @@ package test
import (
"bytes"
- "github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
"io/ioutil"
"net/http"
"testing"
+
+ "github.com/nbio/st"
+ "github.com/h2non/gock"
)
func TestMockSimple(t *testing.T) {
@@ -269,11 +273,12 @@ func TestMockSimple(t *testing.T) {
package test
import (
- "github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
"io/ioutil"
"net/http"
"testing"
+
+ "github.com/nbio/st"
+ "github.com/h2non/gock"
)
func TestClient(t *testing.T) {
@@ -305,9 +310,10 @@ package main
import (
"fmt"
- "gopkg.in/h2non/gock.v1"
"io/ioutil"
"net/http"
+
+ "github.com/h2non/gock"
)
func main() {
@@ -342,8 +348,9 @@ package main
import (
"bytes"
- "gopkg.in/h2non/gock.v1"
"net/http"
+
+ "github.com/h2non/gock"
)
func main() {
diff --git a/_examples/README.md b/_examples/README.md
index 116338a..ea22c04 100644
--- a/_examples/README.md
+++ b/_examples/README.md
@@ -9,7 +9,7 @@ go get -u github.com/nbio/st
```
```bash
-go get -u gopkg.in/h2non/gock.v1
+go get -u github.com/h2non/gock
```
### Usage
diff --git a/_examples/add_matchers/matchers.go b/_examples/add_matchers/matchers.go
index f5aca3a..2bdaae0 100644
--- a/_examples/add_matchers/matchers.go
+++ b/_examples/add_matchers/matchers.go
@@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
func main() {
diff --git a/_examples/basic/basic_test.go b/_examples/basic/basic_test.go
index 10f97ee..5afb8c9 100644
--- a/_examples/basic/basic_test.go
+++ b/_examples/basic/basic_test.go
@@ -2,7 +2,7 @@ package test
import (
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/body_file/file_test.go b/_examples/body_file/file_test.go
index 4ef08c2..18d5cf3 100644
--- a/_examples/body_file/file_test.go
+++ b/_examples/body_file/file_test.go
@@ -3,7 +3,7 @@ package test
import (
"bytes"
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/body_match/body_test.go b/_examples/body_match/body_test.go
index 7c66ebc..b8965ca 100644
--- a/_examples/body_match/body_test.go
+++ b/_examples/body_match/body_test.go
@@ -3,7 +3,7 @@ package test
import (
"bytes"
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/cannot_match/cannot_match.go b/_examples/cannot_match/cannot_match.go
index d69d6a9..593f9a2 100644
--- a/_examples/cannot_match/cannot_match.go
+++ b/_examples/cannot_match/cannot_match.go
@@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
func main() {
diff --git a/_examples/clean/clean.go b/_examples/clean/clean.go
index a36f33f..303dad9 100644
--- a/_examples/clean/clean.go
+++ b/_examples/clean/clean.go
@@ -2,7 +2,7 @@ package main
import (
"fmt"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"net/http"
)
diff --git a/_examples/compressed_body/compression_test.go b/_examples/compressed_body/compression_test.go
index 404a44d..a1aec74 100644
--- a/_examples/compressed_body/compression_test.go
+++ b/_examples/compressed_body/compression_test.go
@@ -4,7 +4,7 @@ import (
"bytes"
"compress/gzip"
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/custom_client/client_test.go b/_examples/custom_client/client_test.go
index 8e32efb..60eeeb3 100644
--- a/_examples/custom_client/client_test.go
+++ b/_examples/custom_client/client_test.go
@@ -2,7 +2,7 @@ package test
import (
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/custom_matcher/matcher.go b/_examples/custom_matcher/matcher.go
index 0b304f0..b5e8450 100644
--- a/_examples/custom_matcher/matcher.go
+++ b/_examples/custom_matcher/matcher.go
@@ -2,7 +2,7 @@ package main
import (
"fmt"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"net/http"
)
diff --git a/_examples/filters/filter.go b/_examples/filters/filter.go
index 84a4704..3c02cdc 100644
--- a/_examples/filters/filter.go
+++ b/_examples/filters/filter.go
@@ -2,7 +2,7 @@ package main
import (
"fmt"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"net/http"
)
diff --git a/_examples/gentleman/gentleman.go b/_examples/gentleman/gentleman.go
index e220df6..37b8ffb 100644
--- a/_examples/gentleman/gentleman.go
+++ b/_examples/gentleman/gentleman.go
@@ -5,7 +5,7 @@ import (
"gopkg.in/h2non/gentleman.v1"
"gopkg.in/h2non/gentleman.v1/context"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
// Usege example with gentleman HTTP client toolkit.
diff --git a/_examples/mapper/map.go b/_examples/mapper/map.go
index da01d69..338c685 100644
--- a/_examples/mapper/map.go
+++ b/_examples/mapper/map.go
@@ -2,7 +2,7 @@ package main
import (
"fmt"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"net/http"
)
diff --git a/_examples/match_headers/headers_test.go b/_examples/match_headers/headers_test.go
index 4db9504..fecf728 100644
--- a/_examples/match_headers/headers_test.go
+++ b/_examples/match_headers/headers_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
func TestMatchHeaders(t *testing.T) {
diff --git a/_examples/match_query/query_test.go b/_examples/match_query/query_test.go
index b9e2f9d..0e85c69 100644
--- a/_examples/match_query/query_test.go
+++ b/_examples/match_query/query_test.go
@@ -2,7 +2,7 @@ package test
import (
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/match_url/url_test.go b/_examples/match_url/url_test.go
index 0a26109..aed0e39 100644
--- a/_examples/match_url/url_test.go
+++ b/_examples/match_url/url_test.go
@@ -2,7 +2,7 @@ package test
import (
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/multiple/multiple_test.go b/_examples/multiple/multiple_test.go
index 9541d0f..e9d60a0 100644
--- a/_examples/multiple/multiple_test.go
+++ b/_examples/multiple/multiple_test.go
@@ -2,7 +2,7 @@ package test
import (
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/networking/networking.go b/_examples/networking/networking.go
index aa45f32..d1924d7 100644
--- a/_examples/networking/networking.go
+++ b/_examples/networking/networking.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"net/http"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
func main() {
diff --git a/_examples/networking_filters/filters.go b/_examples/networking_filters/filters.go
index a680e76..6deea3b 100644
--- a/_examples/networking_filters/filters.go
+++ b/_examples/networking_filters/filters.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"net/http"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
func main() {
diff --git a/_examples/networking_partially_enabled/networking.go b/_examples/networking_partially_enabled/networking.go
index 4b28d32..addb891 100644
--- a/_examples/networking_partially_enabled/networking.go
+++ b/_examples/networking_partially_enabled/networking.go
@@ -9,7 +9,7 @@ import (
"net/http"
"net/http/httptest"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
// Starts a local HTTP server in background
diff --git a/_examples/observe/observe.go b/_examples/observe/observe.go
index c0b9f47..edf5427 100644
--- a/_examples/observe/observe.go
+++ b/_examples/observe/observe.go
@@ -2,7 +2,7 @@ package main
import (
"bytes"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"net/http"
)
diff --git a/_examples/pending/pending.go b/_examples/pending/pending.go
index babe157..b84929a 100644
--- a/_examples/pending/pending.go
+++ b/_examples/pending/pending.go
@@ -2,7 +2,7 @@ package main
import (
"fmt"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"net/http"
)
diff --git a/_examples/persistent/persistent_test.go b/_examples/persistent/persistent_test.go
index a1095ff..6d02a0f 100644
--- a/_examples/persistent/persistent_test.go
+++ b/_examples/persistent/persistent_test.go
@@ -2,7 +2,7 @@ package test
import (
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
@@ -23,4 +23,7 @@ func TestPersistent(t *testing.T) {
body, _ := ioutil.ReadAll(res.Body)
st.Expect(t, string(body)[:13], `{"foo":"bar"}`)
}
+
+ // Verify that we don't have pending mocks
+ st.Expect(t, gock.IsDone(), true)
}
diff --git a/_examples/persistent/times_test.go b/_examples/persistent/times_test.go
index 4a8daa3..5f0d21a 100644
--- a/_examples/persistent/times_test.go
+++ b/_examples/persistent/times_test.go
@@ -2,7 +2,7 @@ package test
import (
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/regexp_matching/regexp_test.go b/_examples/regexp_matching/regexp_test.go
index d08b987..905e80a 100644
--- a/_examples/regexp_matching/regexp_test.go
+++ b/_examples/regexp_matching/regexp_test.go
@@ -3,7 +3,7 @@ package test
import (
"bytes"
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
"io/ioutil"
"net/http"
"testing"
diff --git a/_examples/reply_error/reply_error_test.go b/_examples/reply_error/reply_error_test.go
index 4b423f7..18030cf 100644
--- a/_examples/reply_error/reply_error_test.go
+++ b/_examples/reply_error/reply_error_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"github.com/nbio/st"
- "gopkg.in/h2non/gock.v1"
+ "github.com/h2non/gock"
)
func TestReplyError(t *testing.T) {
diff --git a/debian/changelog b/debian/changelog
index df3b31f..8060672 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-gopkg-h2non-gock.v1 (1.2.0-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Sun, 13 Nov 2022 06:09:14 -0000
+
golang-gopkg-h2non-gock.v1 (1.1.2-1) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/0001-skip-flaky-test.patch b/debian/patches/0001-skip-flaky-test.patch
index f8ef6ef..2b2e2ed 100644
--- a/debian/patches/0001-skip-flaky-test.patch
+++ b/debian/patches/0001-skip-flaky-test.patch
@@ -8,10 +8,10 @@ Forwarded: no
transport_test.go | 1 +
2 files changed, 2 insertions(+)
-diff --git a/matcher_test.go b/matcher_test.go
-index d96c00c..9d56d0b 100644
---- a/matcher_test.go
-+++ b/matcher_test.go
+Index: golang-gopkg-h2non-gock.v1.git/matcher_test.go
+===================================================================
+--- golang-gopkg-h2non-gock.v1.git.orig/matcher_test.go
++++ golang-gopkg-h2non-gock.v1.git/matcher_test.go
@@ -114,6 +114,7 @@ func TestMatcher(t *testing.T) {
}
@@ -20,11 +20,11 @@ index d96c00c..9d56d0b 100644
cases := []struct {
method string
url string
-diff --git a/transport_test.go b/transport_test.go
-index 722a3ce..8fcd9dd 100644
---- a/transport_test.go
-+++ b/transport_test.go
-@@ -32,6 +32,7 @@ func TestTransportCannotMatch(t *testing.T) {
+Index: golang-gopkg-h2non-gock.v1.git/transport_test.go
+===================================================================
+--- golang-gopkg-h2non-gock.v1.git.orig/transport_test.go
++++ golang-gopkg-h2non-gock.v1.git/transport_test.go
+@@ -32,6 +32,7 @@ func TestTransportCannotMatch(t *testing
}
func TestTransportNotIntercepting(t *testing.T) {
diff --git a/debian/patches/0002-skip-TestResponderPreExpiredContext.patch b/debian/patches/0002-skip-TestResponderPreExpiredContext.patch
index 9f3f604..d933c85 100644
--- a/debian/patches/0002-skip-TestResponderPreExpiredContext.patch
+++ b/debian/patches/0002-skip-TestResponderPreExpiredContext.patch
@@ -6,9 +6,11 @@ Forwarded: no
Last-Update: 2022-08-10
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/responder_test.go
-+++ b/responder_test.go
-@@ -103,6 +103,7 @@
+Index: golang-gopkg-h2non-gock.v1.git/responder_test.go
+===================================================================
+--- golang-gopkg-h2non-gock.v1.git.orig/responder_test.go
++++ golang-gopkg-h2non-gock.v1.git/responder_test.go
+@@ -103,6 +103,7 @@ func TestResponderExpiredContext(t *test
}
func TestResponderPreExpiredContext(t *testing.T) {
diff --git a/go.mod b/go.mod
index 5d8ce96..5b36dd8 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module gopkg.in/h2non/gock.v1
+module github.com/h2non/gock
go 1.13
diff --git a/store.go b/store.go
index fc3207e..7ed1316 100644
--- a/store.go
+++ b/store.go
@@ -28,7 +28,7 @@ func Register(mock Mock) {
mocks = append(mocks, mock)
}
-// GetAll returns the current stack of registed mocks.
+// GetAll returns the current stack of registered mocks.
func GetAll() []Mock {
storeMutex.RLock()
defer storeMutex.RUnlock()
diff --git a/version.go b/version.go
index 63378b0..3ff99a2 100644
--- a/version.go
+++ b/version.go
@@ -1,4 +1,4 @@
package gock
// Version defines the current package semantic version.
-const Version = "1.1.2"
+const Version = "1.2.0"
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files