Author: Andreas Tille <tille@debian.org>
Last-Update: 2025-09-14
Description: Mark all tests requiring web access as skip

--- a/agent_test.go
+++ b/agent_test.go
@@ -5,6 +5,9 @@ import (
 )
 
 func TestAgent_Self(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping %s in short mode (requires web access)", t.Name())
+	}
 	c := makeClient(t)
 	agent := c.Agent()
 
@@ -20,6 +23,9 @@ func TestAgent_Self(t *testing.T) {
 }
 
 func TestAgent_Members(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 
@@ -34,6 +40,9 @@ func TestAgent_Members(t *testing.T) {
 }
 
 func TestAgent_Services(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 
@@ -71,6 +80,9 @@ func TestAgent_Services(t *testing.T) {
 }
 
 func TestAgent_SetTTLStatus(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 
@@ -109,6 +121,9 @@ func TestAgent_SetTTLStatus(t *testing.T
 }
 
 func TestAgent_Checks(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 
@@ -134,6 +149,9 @@ func TestAgent_Checks(t *testing.T) {
 }
 
 func TestAgent_Join(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 
@@ -151,6 +169,9 @@ func TestAgent_Join(t *testing.T) {
 }
 
 func TestAgent_ForceLeave(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 
--- a/catalog_test.go
+++ b/catalog_test.go
@@ -5,6 +5,9 @@ import (
 )
 
 func TestCatalog_Datacenters(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping %s in short mode (requires web access)", t.Name())
+	}
 	c := makeClient(t)
 	catalog := c.Catalog()
 
@@ -19,6 +22,9 @@ func TestCatalog_Datacenters(t *testing.
 }
 
 func TestCatalog_Nodes(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	catalog := c.Catalog()
 
@@ -37,6 +43,9 @@ func TestCatalog_Nodes(t *testing.T) {
 }
 
 func TestCatalog_Services(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	catalog := c.Catalog()
 
@@ -55,6 +64,9 @@ func TestCatalog_Services(t *testing.T)
 }
 
 func TestCatalog_Service(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	catalog := c.Catalog()
 
@@ -73,6 +85,9 @@ func TestCatalog_Service(t *testing.T) {
 }
 
 func TestCatalog_Node(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	catalog := c.Catalog()
 
@@ -91,6 +106,9 @@ func TestCatalog_Node(t *testing.T) {
 }
 
 func TestCatalog_Registration(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	catalog := c.Catalog()
 
@@ -146,6 +164,9 @@ func TestCatalog_Registration(t *testing
 }
 
 func TestCatalog_Deregistration(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	catalog := c.Catalog()
 
--- a/event_test.go
+++ b/event_test.go
@@ -5,6 +5,9 @@ import (
 )
 
 func TestEvent_FireList(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	event := c.Event()
 
--- a/health_test.go
+++ b/health_test.go
@@ -6,6 +6,9 @@ import (
 )
 
 func TestHealth_Node(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 	health := c.Health()
@@ -30,6 +33,9 @@ func TestHealth_Node(t *testing.T) {
 }
 
 func TestHealth_Checks(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	agent := c.Agent()
 	health := c.Health()
@@ -63,6 +69,9 @@ func TestHealth_Checks(t *testing.T) {
 }
 
 func TestHealth_Service(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	health := c.Health()
 
@@ -81,6 +90,9 @@ func TestHealth_Service(t *testing.T) {
 }
 
 func TestHealth_State(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	health := c.Health()
 
--- a/kv_test.go
+++ b/kv_test.go
@@ -8,6 +8,9 @@ import (
 )
 
 func TestClientPutGetDelete(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	kv := c.KV()
 
@@ -62,6 +65,9 @@ func TestClientPutGetDelete(t *testing.T
 }
 
 func TestClient_List_DeleteRecurse(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	kv := c.KV()
 
@@ -114,6 +120,9 @@ func TestClient_List_DeleteRecurse(t *te
 }
 
 func TestClient_CAS(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	kv := c.KV()
 
@@ -159,6 +168,9 @@ func TestClient_CAS(t *testing.T) {
 }
 
 func TestClient_WatchGet(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	kv := c.KV()
 
@@ -209,6 +221,9 @@ func TestClient_WatchGet(t *testing.T) {
 }
 
 func TestClient_WatchList(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	kv := c.KV()
 
@@ -261,6 +276,9 @@ func TestClient_WatchList(t *testing.T)
 }
 
 func TestClient_Keys_DeleteRecurse(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	kv := c.KV()
 
@@ -308,6 +326,9 @@ func TestClient_Keys_DeleteRecurse(t *te
 }
 
 func TestClient_AcquireRelease(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	session := c.Session()
 	kv := c.KV()
--- a/session_test.go
+++ b/session_test.go
@@ -5,6 +5,9 @@ import (
 )
 
 func TestSession_CreateDestroy(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	session := c.Session()
 
@@ -32,6 +35,9 @@ func TestSession_CreateDestroy(t *testin
 }
 
 func TestSession_CreateRenewDestroy(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	session := c.Session()
 
@@ -80,6 +86,9 @@ func TestSession_CreateRenewDestroy(t *t
 }
 
 func TestSession_Info(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	session := c.Session()
 
@@ -131,6 +140,9 @@ func TestSession_Info(t *testing.T) {
 }
 
 func TestSession_Node(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	session := c.Session()
 
@@ -163,6 +175,9 @@ func TestSession_Node(t *testing.T) {
 }
 
 func TestSession_List(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	session := c.Session()
 
--- a/status_test.go
+++ b/status_test.go
@@ -5,6 +5,9 @@ import (
 )
 
 func TestStatusLeader(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	status := c.Status()
 
@@ -18,6 +21,9 @@ func TestStatusLeader(t *testing.T) {
 }
 
 func TestStatusPeers(t *testing.T) {
+        if testing.Short() {
+                t.Skip("skipping %s in short mode (requires web access)", t.Name())
+        }
 	c := makeClient(t)
 	status := c.Status()
 
