-
Notifications
You must be signed in to change notification settings - Fork 5
/
testing.html
238 lines (210 loc) · 10.4 KB
/
testing.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,
initial-scale=1,
minimum-scale=1,
maximum-scale=1,
user-scalable=no,
minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>Internal Tutorial Testing - Vanadium</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,400,400italic,500,500italic,700,700italic|Source+Code+Pro">
<link rel="stylesheet" href="/css/github.css">
<link rel="stylesheet" href="/css/material.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="/js/react-0.14.3.min.js"></script>
<script src="/js/react-dom-0.14.3.min.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="114x114" href="/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="60x60" href="/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="160x160" href="/favicons/favicon-160x160.png">
<link rel="icon" type="image/png" sizes="192x192" href="/favicons/favicon-192x192.png">
<meta name="msapplication-TileColor" content="#00acc1">
<meta name="msapplication-TileImage" content="/favicons/mstile-144x144.png">
<link rel="stylesheet" href="/css/bundle.cyan.css">
<script src="/js/bundle.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59720824-6', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<header class="mdl-shadow--2dp">
<div class="row">
<div class="icon menu"><i class="material-icons">menu</i></div>
<div class="icon v-icon"><a href="/"><img src="/images/v-icon-white.svg"></a></div>
<div class="logo"><a href="/core.html">Vanadium Core</a></div>
<div class="spacer"></div>
<nav>
<a href="/core.html">Overview</a>
<a href="/installation/">Installation</a>
<a href="/tutorials/hello-world.html">Tutorials</a>
</nav>
</div>
</header>
<div data-subsite="core" class="sidebar"></div>
<div class="sidebar-data">
<a href="/core.html">Overview</a>
<a href="/installation/">Installation</a>
<a href="#" class="nav">Tutorials</a>
<nav>
<a href="/tutorials/hello-world.html">Hello World</a>
<a href="/tutorials/basics.html">Client/Server Basics</a>
<a href="#" class="nav">Security</a>
<nav>
<a href="/tutorials/security/">Overview</a>
<a href="/tutorials/security/principals-and-blessings.html">Principals and Blessings</a>
<a href="/tutorials/security/permissions-authorizer.html">Permissions Authorizer</a>
<a href="/tutorials/security/first-party-caveats.html">Caveats</a>
<a href="/tutorials/security/third-party-caveats.html">Third-party Caveats</a>
<a href="/tutorials/security/agent.html">The Agent</a>
<a href="/tutorials/security/custom-authorizer.html">Custom Authorizer</a>
</nav>
<a href="#" class="nav">Naming</a>
<nav>
<a href="/tutorials/naming/">Overview</a>
<a href="/tutorials/naming/mount-table.html">The Mount Table</a>
<a href="/tutorials/naming/namespace.html">Namespaces</a>
<a href="/tutorials/naming/suffix-part1.html">The Suffix - Part I</a>
<a href="/tutorials/naming/suffix-part2.html">The Suffix - Part II</a>
<a href="/tutorials/naming/globber.html">Globber</a>
</nav>
<a href="#" class="nav">Syncbase</a>
<nav>
<a href="/tutorials/syncbase/">Overview</a>
<a href="/tutorials/syncbase/localPersist.html">Local Persistence</a>
<a href="/tutorials/syncbase/sync.html">Syncing</a>
</nav>
<a href="#" class="nav">Java</a>
<nav>
<a href="/tutorials/java/">Overview</a>
<a href="/tutorials/java/fortune.html">Fortune in Java</a>
<a href="/tutorials/java/android.html">Location Service in Android</a>
</nav>
<a href="/tutorials/faq.html">Tutorial FAQ</a>
</nav>
<a href="#" class="nav">Concepts</a>
<nav>
<a href="/concepts/rpc.html">RPC System</a>
<a href="/concepts/naming.html">Naming</a>
<a href="/concepts/security.html">Security</a>
<a href="/concepts/device-management.html">Device Management</a>
</nav>
<a href="/example-apps.html">Example Apps</a>
<a href="/api-reference.html">API Reference</a>
<a href="#" class="nav">Community</a>
<nav>
<a href="/community/coding-guidelines.html">Coding Guidelines</a>
<a href="/community/contributing.html">Contributing</a>
<a href="/community/mailing-lists.html">Mailing List</a>
<a href="/community/roadmap.html">Roadmap</a>
</nav>
<a href="#" class="nav">Tools</a>
<nav>
<a href="/tools/identity-service-faq.html">Vanadium Identity Service</a>
<a href="/tools/jiri.html">Jiri</a>
<a href="/tools/namespace-browser.html">Namespace Browser</a>
<a href="/tools/services.html">Vanadium Cloud Services</a>
</nav>
<a href="#" class="nav">Design Docs</a>
<nav>
<a href="/designdocs/authentication.html">Authentication Protocol</a>
<a href="/designdocs/identity-service.html">Identity Service</a>
<a href="/designdocs/vdl-spec.html">VDL Specification</a>
<a href="/designdocs/vom-spec.html">VOM Specification</a>
</nav>
<a href="/glossary.html">Glossary</a>
<a href="/faq.html">FAQ</a>
<a href="/tos.html">Terms of Service</a>
</div>
<main>
<h1 class="title">
Internal Tutorial Testing
</h1>
<p>This page explains how to <strong>test the tutorials</strong> against a local, development
branch of Vanadium.</p>
<p>In the overall external instruction sequence, this page replaces the external
<a href="/installation/">installation instructions</a>, allowing a Vanadium team member to
use their existing installation instead.</p>
<p>To run the tests, <code>$JIRI_ROOT</code> needs a value, and the binaries need to be in
place. Check your state:</p>
<!-- @checkInstall -->
<pre><code>[ -z "${JIRI_ROOT:?'Must define JIRI_ROOT'}" ]
[ -x "$JIRI_ROOT/.jiri_root/scripts/jiri" ] || echo 'No jiri!'
[ -x "$JIRI_ROOT/release/go/bin/principal" ] || echo 'No bin!'
</code></pre><p>Development also requires Node.js. Install it as follows:</p>
<pre><code># Install the Node.js profile. The Makefile adds the nodejs binary to $PATH
# automatically.
jiri profile install v23:nodejs
</code></pre><p>Since you're presumably considering a commit, be sure everything is up to date:</p>
<pre><code>unset GOPATH
jiri update
jiri go install v.io/...
</code></pre><p>If this builds cleanly, you can meaningfully test the tutorials.</p>
<p>The tutorials don't use the <code>jiri</code> tool, so define the following
<strong>tutorial environment</strong> to run the tests:</p>
<!-- @defineLocalEnv @test @testui @buildjs -->
<pre><code>export VANADIUM_RELEASE=${JIRI_ROOT}/release/go
# Extract GOPATH from jiri utility.
export V23_GOPATH=`jiri go env GOPATH`
echo "V23_GOPATH=$V23_GOPATH"
</code></pre><p>That's it for prep.</p>
<p>Run all tutorial tests against your development branch like this:</p>
<pre><code>cd ${JIRI_ROOT}/website
make test-tutorials
</code></pre><p>If those pass, you're good.</p>
<h2 id="manual-execution">Manual execution</h2>
<p>If you're having trouble, you can do tutorials manually to pinpoint a problem.</p>
<p>Behave like a user following the instructions, but skip the Vanadium
installation step and start the tutorials with the <a href="/tutorials/setup.html">setup
page</a>. Due to the definitions above, the tutorial code
will run using your local development branch.</p>
<h2 id="purely-external-execution">Purely external execution</h2>
<p>The command:</p>
<pre><code>cd ${JIRI_ROOT}/website
make test-tutorials-external
</code></pre><p>This tests the tutorials <strong>against Vanadium code freshly downloaded from the
external site to your <code>/tmp</code> directory</strong>. It's a production test behaving like
an external user; <em>not</em> a local test running against local changes. If you're
broken locally, this is a way to see if an external user is seeing a problem
too.</p>
</main>
<nav class="previous-next">
<a href="/performance.html" class="previous">
<div class="icon"><i class="material-icons">arrow_back</i></div>
<div class="text-wrapper">
<small>Previous</small>
<div class="text">
<span>Vanadium Performance</span>
</div>
</div>
</a>
<a href="/tos.html" class="next">
<div class="text-wrapper">
<small>Next</small>
<div class="text">
<span>Terms of Service</span>
</div>
</div>
<div class="icon"><i class="material-icons">arrow_forward</i></div>
</a>
</nav>
</body>
</html>