Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: test link sitemap (#15535)

Danny Xua2a2239d4594
diff --git a/.github/workflows/test_link.yml b/.github/workflows/test_link.yml
index 0c6a86da37..bdcbb9ac85 100644
--- a/.github/workflows/test_link.yml
+++ b/.github/workflows/test_link.yml
@@ -9,8 +9,8 @@ on:
- 'frontend/**'
jobs:
- go-tests:
- runs-on: ubuntu-latest
+ link-tests:
+ runs-on: self-hosted
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
diff --git a/frontend/src/customAppProfile.ts b/frontend/src/customAppProfile.ts
index 9be56d876e..905981577c 100644
--- a/frontend/src/customAppProfile.ts
+++ b/frontend/src/customAppProfile.ts
@@ -36,7 +36,7 @@ const overrideAppFeatures = (
const modeInQuery = query.get("mode");
if (modeInQuery === "STANDALONE") {
- // The webapp is embedded within iframe
+ // The webapp is embedded within iframe.
actuatorStore.appProfile.embedded = true;
// mode=STANDALONE is not easy to read, but for legacy support we keep it as
diff --git a/helm-charts/helm_test.go b/helm-charts/helm_test.go
deleted file mode 100644
index f196c8d094..0000000000
--- a/helm-charts/helm_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package helm
-
-import (
- "testing"
-
- "github.com/stretchr/testify/require"
-)
-
-// TestArtifactHub tests our artifact metadata exists.
-// We provide the chart template via GitHub Pages.
-func TestArtifactHub(t *testing.T) {
- metadataFilePaths := []string{
- "../docs/index.yaml",
- "../docs/bytebase-1.1.1.tgz",
- }
- a := require.New(t)
- for _, path := range metadataFilePaths {
- a.FileExists(path)
- }
-}
diff --git a/scripts/check_link_test.go b/scripts/check_link_test.go
index 5ea5054152..ed643b96e9 100644
--- a/scripts/check_link_test.go
+++ b/scripts/check_link_test.go
@@ -1,6 +1,9 @@
package tests
import (
+ "fmt"
+ "io"
+ "net/http"
"net/url"
"os"
"path/filepath"
@@ -41,7 +44,19 @@ func TestValidateLinks(t *testing.T) {
links, err := extractLinkRecursive()
a.NoError(err)
- sm, err := sitemap.Get("https://bytebase.com/sitemap.xml", nil)
+ resp, err := http.Get("http://bytebase.com/sitemap.xml")
+ if err != nil {
+ t.Fatalf("failed to get sitemap xml: %v", err)
+ }
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ if err != nil {
+ t.Fatalf("failed to read sitemap xml: %v", err)
+ }
+ fmt.Println(string(body))
+
+ sm, err := sitemap.Get("http://bytebase.com/sitemap.xml", nil)
a.NoError(err)
paths := map[string]struct{}{}