Skip to content
Permalink
Browse files

osmapi: reset default datasource url after tests

  • Loading branch information...
paulmach committed Sep 14, 2018
1 parent 766c86c commit 2bdd701357474f0fef15f31f0cb5d7332555448a
Showing with 21 additions and 0 deletions.
  1. +3 −0 osmapi/changeset_test.go
  2. +3 −0 osmapi/map_test.go
  3. +3 −0 osmapi/node_test.go
  4. +3 −0 osmapi/note_test.go
  5. +3 −0 osmapi/relation_test.go
  6. +3 −0 osmapi/user_test.go
  7. +3 −0 osmapi/way_test.go
@@ -19,6 +19,9 @@ func TestChangeset_urls(t *testing.T) {
defer ts.Close()

DefaultDatasource.BaseURL = ts.URL
defer func() {
DefaultDatasource.BaseURL = BaseURL
}()

t.Run("changeset", func(t *testing.T) {
Changeset(ctx, 1)
@@ -22,6 +22,9 @@ func TestMap_urls(t *testing.T) {
defer ts.Close()

DefaultDatasource.BaseURL = ts.URL
defer func() {
DefaultDatasource.BaseURL = BaseURL
}()

t.Run("map", func(t *testing.T) {
bound := &osm.Bounds{
@@ -22,6 +22,9 @@ func TestNode_urls(t *testing.T) {
defer ts.Close()

DefaultDatasource.BaseURL = ts.URL
defer func() {
DefaultDatasource.BaseURL = BaseURL
}()

t.Run("node", func(t *testing.T) {
Node(ctx, 1)
@@ -21,6 +21,9 @@ func TestNote_urls(t *testing.T) {
defer ts.Close()

DefaultDatasource.BaseURL = ts.URL
defer func() {
DefaultDatasource.BaseURL = BaseURL
}()

t.Run("note", func(t *testing.T) {
Note(ctx, 1)
@@ -22,6 +22,9 @@ func TestRelation_urls(t *testing.T) {
defer ts.Close()

DefaultDatasource.BaseURL = ts.URL
defer func() {
DefaultDatasource.BaseURL = BaseURL
}()

t.Run("relation", func(t *testing.T) {
Relation(ctx, 1)
@@ -19,6 +19,9 @@ func TestUser_urls(t *testing.T) {
defer ts.Close()

DefaultDatasource.BaseURL = ts.URL
defer func() {
DefaultDatasource.BaseURL = BaseURL
}()

t.Run("user", func(t *testing.T) {
User(ctx, 1)
@@ -22,6 +22,9 @@ func TestWay_urls(t *testing.T) {
defer ts.Close()

DefaultDatasource.BaseURL = ts.URL
defer func() {
DefaultDatasource.BaseURL = BaseURL
}()

t.Run("way", func(t *testing.T) {
Way(ctx, 1)

0 comments on commit 2bdd701

Please sign in to comment.
You can’t perform that action at this time.