-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest003-notify-cvs-webhook.html
More file actions
146 lines (116 loc) · 3.64 KB
/
test003-notify-cvs-webhook.html
File metadata and controls
146 lines (116 loc) · 3.64 KB
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="test.css">
<title>Test 003</title>
</head>
<body>
<header>
<div class="content">
<h1><a class="homelink" href="/">Postsai</a></h1>
<h2>The Commit Database</h2>
<a class="button" href="https://github.com/postsai/postsai">GitHub</a>
<a class="button" href="https://arianne-project.org/postsai/query.html?date=month">Demo</a>
<a class="button download" href="https://github.com/postsai/postsai/releases/download/v0.9.7/postsai-0.9.7.zip">Download</a>
</div>
</header>
<div class="content">
<section>
<table class="table table-bordered">
<tr class="th">
<th colspan="2"><h3>Test 003: notify-cvs-webhook</h3></th>
</tr>
<tr>
<th>Objective</th>
<td>Ensure it is possible to invoke webhooks from CVS.</td>
</tr>
<tr>
<th>Test Status</th>
<td>Stable</td>
</tr>
<tr>
<th>Prerequisite</th>
<td>A Postsai installation on a Debian/Ubuntu system and the CVS command line tool.</td>
</tr>
</table>
</section>
<section>
<table class="table table-striped table-bordered table-hover">
<tr class="th">
<th>#</th>
<th>Action</th>
<th>User input</th>
<th>Expected result</th>
</tr>
<tr>
<td>1</td>
<td>Create test workspace and change into it</td>
<td><code>mkdir /tmp/postsaitest; cd /tmp/postsaitest</code></td>
<td>No error messages and the current working directory was changed.</td>
</tr>
<tr>
<td>2</td>
<td>Download notify-cvs-webhook </td>
<td><code>wget -O notify-cvs-webhook.py https://raw.githubusercontent.com/postsai/notify-cvs-webhook/master/loginfo.py</code></td>
<td></td>
</tr>
<tr>
<td>3</td>
<td>Make it executable</td>
<td><code>chmod +x notify-cvs-webhook.py</code></td>
<td></td>
</tr>
<tr>
<td>4</td>
<td>Create a new CVS server repository</td>
<td><code>cvs -d /tmp/postsaitest/cvsserver init</code></td>
<td>No error message</td>
</tr>
<tr>
<td>5</td>
<td>Checkout working copy of CVSROOT</td>
<td><code>cvs -d /tmp/postsaitest/cvsserver checkout CVSROOT</code></td>
<td>Multiple lines starting with "U", including U CVSROOT/loginfo</td>
</tr>
<tr>
<td>6</td>
<td>Change into CVSROOT working directory</td>
<td><code>cd CVSROOT</code></td>
<td>Working directory changed</td>
</tr>
<tr>
<td>7</td>
<td>Edit loginfo configuration file to add invocation of notify-cvs-webhook</td>
<td><code>pico loginfo</code><br>Add the following line at the end of the file:<br>
<code>ALL /tmp/postsaitest/notify-cvs-webhook.py --url="http://localhost/postsai/api.py" --home-url="https://cvs.example.com/cgi-bin/viewvc.cgi" --repository-url="/tmp/postsaitest/cvsserver" --repository=myrepo --default-email-domain=example.com --commitid=%I --folder=%p %{sVv}</code><br>
and exit the editor with ^O ^X</td>
<td>File was saved</td>
</tr>
<tr>
<td>8</td>
<td>Commit the changes</td>
<td><code>cvs commit -m "enabled notify-cvs-webhook"</code></td>
<td>A new revision of loginfo is created and an additional messages says: Rebuilding administrative file database</td>
</tr>
<tr>
<td>9</td>
<td>Make a test commit</td>
<td><code>echo a > test; cvs add test; cvs commit -m "test message" test</code></td>
<td>A new revision of test is created</td>
</tr>
<tr>
<td>10</td>
<td>Verify commit entry in postsai</td>
<td>Open http://localhost/postsai/ in a web browser.</td>
<td>The commit of test is listed. The File-column has a link to https://cvs.example.com/cgi-bin/viewvc.cgi/myrepo/CVSROOT/test?revision=1.1&view=markup</td>
</tr>
</table>
</section>
<footer>
(C) Copyright 2016-2017 Postsai. Postsai is released as Free and Open Source Software under MIT license.
</footer>
</div>
</body>
</html>