From 3a77e6e31f9cdfc9533d09e7b1337f44d6b80687 Mon Sep 17 00:00:00 2001 From: Jordan Selig Date: Fri, 6 Nov 2026 21:25:40 -0500 Subject: [PATCH] Fix App Service Builder documentation links Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- README.md | 14 +++++++------- demo.html | 4 ++-- tests/test_app.py | 11 +++++++++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e446ea1..83933c1 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ not the current working directory. ### Deploy your fork with Portal -Follow the [Portal quickstart](https://builderapps.azure.com/docs/quickstarts/portal/) +Follow the [Portal quickstart](https://builder.appservice.azure.com/docs/quickstarts/portal/) using your Private Preview access: 1. Sign in to Portal and select your authorized subscription and resource group. @@ -134,7 +134,7 @@ In Portal **Variables**, set `SAMPLE_GREETING` and choose **Save and deploy**. **Save only** changes desired configuration, not existing runtime processes: explicitly deploy afterward. Wait for completion and check `/` again. Activating a retained version uses that version's historical values. -See the [variables guide](https://builderapps.azure.com/docs/guides/variables/). +See the [variables guide](https://builder.appservice.azure.com/docs/guides/variables/). ### Push an app change and explicitly redeploy @@ -184,11 +184,11 @@ support still requires end-to-end qualification. ## Resources -- [App Service Builder documentation](https://builderapps.azure.com/docs/) -- [Portal quickstart](https://builderapps.azure.com/docs/quickstarts/portal/) -- [Supported runtimes](https://builderapps.azure.com/docs/reference/runtimes/) -- [Variables guide](https://builderapps.azure.com/docs/guides/variables/) -- [More samples](https://builderapps.azure.com/docs/samples/) +- [App Service Builder documentation](https://builder.appservice.azure.com/docs/) +- [Portal quickstart](https://builder.appservice.azure.com/docs/quickstarts/portal/) +- [Supported runtimes](https://builder.appservice.azure.com/docs/reference/runtimes/) +- [Variables guide](https://builder.appservice.azure.com/docs/guides/variables/) +- [More samples](https://builder.appservice.azure.com/docs/samples/) ## Contributing and security diff --git a/demo.html b/demo.html index d1451c9..124c57b 100644 --- a/demo.html +++ b/demo.html @@ -105,7 +105,7 @@
App Service Builder
@@ -116,7 +116,7 @@

A little Python.
A place to begin.

A small HTTP app built with Python's standard library. Explore the sample, change the greeting, and learn to deploy with App Service Builder.

diff --git a/tests/test_app.py b/tests/test_app.py index 8e73e03..e03fd9e 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -2,11 +2,19 @@ import threading import unittest from http.client import HTTPConnection +from pathlib import Path from unittest.mock import patch from app import Handler, SampleHTTPServer +class DocumentationTests(unittest.TestCase): + def test_readme_docs_host(self): + readme = (Path(__file__).resolve().parents[1] / "README.md").read_text(encoding="utf-8") + self.assertIn("https://builder.appservice.azure.com/docs/", readme) + self.assertNotIn("https://builderapps.azure.com/docs", readme) + + class HTTPTests(unittest.TestCase): def setUp(self): self.environment = patch.dict(os.environ, {}, clear=True) @@ -71,6 +79,9 @@ def test_root_default_greeting_and_routes(self): self.assertIn(f'href="{path}"', body) self.assertNotIn("{{GREETING}}", body) self.assertNotIn("/demo", body) + self.assertIn('href="https://builder.appservice.azure.com/docs/"', body) + self.assertIn('href="https://builder.appservice.azure.com/docs/quickstarts/portal/"', body) + self.assertNotIn("https://builderapps.azure.com/docs", body) def test_root_escapes_public_greeting(self): os.environ["SAMPLE_GREETING"] = ' & café'