Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<div class="brand"><span class="brand-mark" aria-hidden="true"><i></i><i></i><i></i><i></i></span>App Service Builder</div>
<nav aria-label="Sample navigation">
<a href="/">Sample home</a>
<a href="https://builderapps.azure.com/docs/">Documentation <span aria-hidden="true">↗</span></a>
<a href="https://builder.appservice.azure.com/docs/">Documentation <span aria-hidden="true">↗</span></a>
</nav>
</header>
<main id="main">
Expand All @@ -116,7 +116,7 @@ <h2>A little Python.<br>A place to begin.</h2>
<p class="intro">A small HTTP app built with Python's standard library. Explore the sample, change the greeting, and learn to deploy with App Service Builder.</p>
<div class="actions">
<a class="button" href="/health">Open health endpoint <span aria-hidden="true">↗</span></a>
<a class="text-link" href="https://builderapps.azure.com/docs/quickstarts/portal/">Deployment guide</a>
<a class="text-link" href="https://builder.appservice.azure.com/docs/quickstarts/portal/">Deployment guide</a>
</div>
</div>
<div class="specimen" aria-label="Python greeting configuration example">
Expand Down
11 changes: 11 additions & 0 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"] = '<script>alert("Hi")</script> & café'
Expand Down
Loading