From: "Dr. Tobias Quathamer" <toddy@debian.org>
Date: Wed, 24 Sep 2025 22:21:38 +0200
Subject: Skip TestCommands/mod*.txt which need internet or npm

testscripts/commands/mod{,_get,_get_u,_vendor,__disable,_npm*}.txt
require Go module, internet access or npm which are not available
during Debian package build.

Origin: vendor
Forwarded: not-needed
Last-Update: 2023-06-29, 2023-09-23, 2023-10-11, 2023-11-05, 2024-02-24
---
 testscripts/commands/mod.txt                  | 45 --------------------
 testscripts/commands/mod__disable.txt         | 15 -------
 testscripts/commands/mod_get.txt              | 15 -------
 testscripts/commands/mod_get_u.txt            | 22 ----------
 testscripts/commands/mod_npm.txt              | 45 --------------------
 testscripts/commands/mod_npm_withexisting.txt | 61 ---------------------------
 testscripts/commands/mod_vendor.txt           | 31 --------------
 7 files changed, 234 deletions(-)
 delete mode 100644 testscripts/commands/mod__disable.txt
 delete mode 100644 testscripts/commands/mod_get.txt
 delete mode 100644 testscripts/commands/mod_get_u.txt
 delete mode 100644 testscripts/commands/mod_npm.txt
 delete mode 100644 testscripts/commands/mod_npm_withexisting.txt
 delete mode 100644 testscripts/commands/mod_vendor.txt

diff --git a/testscripts/commands/mod.txt b/testscripts/commands/mod.txt
index 2fa17db..eb42aaa 100644
--- a/testscripts/commands/mod.txt
+++ b/testscripts/commands/mod.txt
@@ -1,49 +1,4 @@
-# Test the hugo mod commands.
-
-dostounix golden/vendor.txt
-dostounix golden/go.mod.testsubmod
-
-hugo mod graph
-stdout 'empty-hugo'
-hugo mod verify
-! stderr .
-hugo mod get -u
-! stderr .
-hugo mod get -u ./...
-! stderr .
-hugo mod vendor
-! stderr .
-cmp _vendor/modules.txt golden/vendor.txt
-hugo mod clean
-! stderr .
-stdout 'hugo: removed 1 dirs in module cache for \"github.com/bep/empty-hugo-module\"'
-hugo mod clean --all
-# Currently this is 299 on MacOS and 301 on Linux.
-stdout 'Deleted (2|3)\d{2} files from module cache\.'
-cd submod
-hugo mod init testsubmod
-cmpenv go.mod $WORK/golden/go.mod.testsubmod
 hugo mod get -h
 stdout 'hugo mod get \[flags\] \[args\]'
 hugo mod get --help
 stdout 'hugo mod get \[flags\] \[args\]'
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/bep/empty-hugo-module"
-[[module.imports.mounts]]
-source="README.md"
-target="content/_index.md"
--- go.mod --
-go 1.19
-
-module github.com/gohugoio/testmod
--- submod/hugo.toml --
-title = "Hugo Sub Module"
--- golden/vendor.txt --
-# github.com/bep/empty-hugo-module v1.0.0
--- golden/go.mod.testsubmod --
-module testsubmod
-
-go ${GOVERSION}
diff --git a/testscripts/commands/mod__disable.txt b/testscripts/commands/mod__disable.txt
deleted file mode 100644
index f2d65dd..0000000
--- a/testscripts/commands/mod__disable.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-hugo mod graph
-stdout 'withhugotoml.*commonmod'
-
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-disable = true
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-module foo
-go 1.19
-
diff --git a/testscripts/commands/mod_get.txt b/testscripts/commands/mod_get.txt
deleted file mode 100644
index d11d3b8..0000000
--- a/testscripts/commands/mod_get.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-hugo mod get
-stderr 'withhugotoml.*v1.1.0'
-
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-disable = true
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-module foo
-go 1.20
-
diff --git a/testscripts/commands/mod_get_u.txt b/testscripts/commands/mod_get_u.txt
deleted file mode 100644
index f3efc0c..0000000
--- a/testscripts/commands/mod_get_u.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-hugo mod get -u
-hugo mod graph
-stdout 'commonmod@v1.0.1.*commonmod2@v1.0.2'
-
--- hugo.toml --
-title = "Hugo Modules Update Test"
-theme = ["my-theme"]
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-disable = true
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-module foo
-go 1.20
-require (
-  github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.1.0 // indirect
-  github.com/gohugoio/hugo-mod-integrationtests/commonmod v0.0.0-20230823103305-919cefe8a425 // indirect
-)
--- themes/my-theme/dummy.txt --
-MY THEME
diff --git a/testscripts/commands/mod_npm.txt b/testscripts/commands/mod_npm.txt
deleted file mode 100644
index 3d8903e..0000000
--- a/testscripts/commands/mod_npm.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-# Test mod npm.
-
-dostounix golden/package.json
-
-
-hugo mod npm pack
-cmp package.json golden/package.json
-
--- hugo.toml --
-baseURL = "https://example.org/"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugoTestModule2"
-
-
--- golden/package.json --
-{
-  "comments": {
-    "dependencies": {
-      "react-dom": "github.com/gohugoio/hugoTestModule2"
-    },
-    "devDependencies": {
-      "@babel/cli": "github.com/gohugoio/hugoTestModule2",
-      "@babel/core": "github.com/gohugoio/hugoTestModule2",
-      "@babel/preset-env": "github.com/gohugoio/hugoTestModule2",
-      "postcss-cli": "github.com/gohugoio/hugoTestModule2",
-      "tailwindcss": "github.com/gohugoio/hugoTestModule2"
-    }
-  },
-  "dependencies": {
-    "react-dom": "^16.13.1"
-  },
-  "devDependencies": {
-    "@babel/cli": "7.8.4",
-    "@babel/core": "7.9.0",
-    "@babel/preset-env": "7.9.5",
-    "postcss-cli": "7.1.0",
-    "tailwindcss": "1.2.0"
-  },
-  "name": "script-mod_npm",
-  "version": "0.1.0"
-}
--- go.mod --
-module github.com/gohugoio/hugoTestModule
-go 1.20
diff --git a/testscripts/commands/mod_npm_withexisting.txt b/testscripts/commands/mod_npm_withexisting.txt
deleted file mode 100644
index 9f72eef..0000000
--- a/testscripts/commands/mod_npm_withexisting.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-# Test mod npm.
-
-# See https://github.com/gohugoio/hugo/issues/13465
-[windows] skip
-
-dostounix golden/package.json
-
-hugo mod npm pack
-cmp package.json golden/package.json
-
--- hugo.toml --
-baseURL = "https://example.org/"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugoTestModule2"
--- package.json --
-{
-  "comments": {
-    "foo": {
-      "a": "b"
-    }
-  },
-  "devDependencies": {
-    "tailwindcss": "2.2.0"
-  },
-  "name": "mypackage",
-  "version": "1.1.0"
-}
--- golden/package.json --
-{
-  "comments": {
-    "dependencies": {
-      "react-dom": "github.com/gohugoio/hugoTestModule2"
-    },
-    "devDependencies": {
-      "@babel/cli": "github.com/gohugoio/hugoTestModule2",
-      "@babel/core": "github.com/gohugoio/hugoTestModule2",
-      "@babel/preset-env": "github.com/gohugoio/hugoTestModule2",
-      "postcss-cli": "github.com/gohugoio/hugoTestModule2",
-      "tailwindcss": "project"
-    },
-    "foo": {
-      "a": "b"
-    }
-  },
-  "dependencies": {
-    "react-dom": "^16.13.1"
-  },
-  "devDependencies": {
-    "@babel/cli": "7.8.4",
-    "@babel/core": "7.9.0",
-    "@babel/preset-env": "7.9.5",
-    "postcss-cli": "7.1.0",
-    "tailwindcss": "2.2.0"
-  },
-  "name": "mypackage",
-  "version": "1.1.0"
-}
--- go.mod --
-module github.com/gohugoio/hugoTestModule
-go 1.20
diff --git a/testscripts/commands/mod_vendor.txt b/testscripts/commands/mod_vendor.txt
deleted file mode 100644
index 20862c1..0000000
--- a/testscripts/commands/mod_vendor.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-dostounix golden/vendor.txt
-
-hugo mod vendor
-cmp _vendor/modules.txt golden/vendor.txt
-ls _vendor/github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml
-stdout 'config.toml'
-ls _vendor/github.com/gohugoio/hugo-mod-integrationtests/withhugotoml
-stdout 'hugo.toml'
-
-
-
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-go 1.19
-
-module github.com/gohugoio/testmod
-
-require (
-    github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml v1.0.0 
-    github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.0.0
-)
-
--- golden/vendor.txt --
-# github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml v1.0.0
-# github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.0.0
