summaryrefslogtreecommitdiff
path: root/testing.html
diff options
context:
space:
mode:
authorCodeberg Pages <>2026-03-18 16:12:27 +0000
committerCodeberg Pages <>2026-03-18 16:12:27 +0000
commit0b8d6986c445e236a0794b57c120aadb9e6ec143 (patch)
treefbe9cc882d613c437cc3ee45187b0f8d8fbd0d03 /testing.html
Pages: Deploy 076a7d573f268ddea2fada1de5e2b12fe07ad6a1pages
Diffstat (limited to 'testing.html')
-rw-r--r--testing.html68
1 files changed, 68 insertions, 0 deletions
diff --git a/testing.html b/testing.html
new file mode 100644
index 0000000..93c8f51
--- /dev/null
+++ b/testing.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="css/simple.css">
+ <link rel="stylesheet" href="css/screen.css">
+ <title>Testing - Documentation</title>
+</head>
+<body>
+ <header>
+ <h1>Documentation</h1>
+
+ <p>eduVPN for Linux</p>
+
+
+ <nav>
+
+ <a href="index.html">About</a>
+
+ <a href="building.html">Building</a>
+
+ <a href="testing.html">Testing</a>
+
+ <a href="building-client.html">Building a client</a>
+
+ <a href="apidocs.html">API Docs</a>
+
+ </nav>
+
+ </header>
+ <main>
+
+ <aside>
+
+ <ul>
+
+ <li class="nav-item" data-level="2"><a href="#testing-the-python-code" class="nav-link">Testing the Python code</a>
+ <ul class="nav flex-column">
+ </ul>
+ </li>
+ </ul>
+ </aside>
+
+ <h1 id="testing">Testing<a class="headerlink" href="#testing" title="Permanent link">#</a></h1>
+<p>The Go library right now has various tests defined. E.g. server interaction, oauth, discovery and signature verification tests.</p>
+<p>To run the Go test suite, issue the following command in a shell</p>
+<pre><code class="language-bash">make test
+</code></pre>
+<p>Note that this runs the tests without any server interaction (so for now only the signature verification tests). To run the tests with an eduVPN server you need to specify environment variables:</p>
+<pre><code class="language-bash">SERVER_URI=&quot;eduvpn.example.com&quot; PORTAL_USER=&quot;example&quot; PORTAL_PASS=&quot;example&quot; make test
+</code></pre>
+<p>This needs <a href="https://selenium-python.readthedocs.io/">python3-selenium</a> and <a href="https://github.com/mozilla/geckodriver/releases">geckodriver</a> (extract and put in your <code>$PATH</code>). Note that testing with a server assumes it uses a default portal, due to it needing to click on buttons on the web page. You can add your own portal by customizing the <a href="https://codeberg.org/eduVPN/eduvpn-common/src/branch/main/selenium_eduvpn.py">called Selenium script</a>.</p>
+<p>There are other environment variables that can be used:</p>
+<ul>
+<li><code>OAUTH_EXPIRED_TTL</code>: Use this for a server which has a low OAuth access token expiry time, e.g. 10 seconds. You would then set this variable to <code>"10"</code> so that a test is ran which waits for 10 seconds for the OAuth tokens to expire</li>
+</ul>
+<h2 id="testing-the-python-code">Testing the Python code<a class="headerlink" href="#testing-the-python-code" title="Permanent link">#</a></h2>
+<p>To test the Python code, issue the following command in a shell (you will need dependencies for all wrappers if you do this[^1]):</p>
+<pre><code class="language-bash">make -C wrappers/python test
+</code></pre>
+ </main>
+
+ <footer>
+ <p>Documentation - eduVPN for Linux</p>
+ </footer>
+</body>
+</html> \ No newline at end of file