Merge ~rmescandon/snappy-hwe-snaps/+git/engineering-tests:serial-vault-corrections into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Roberto Mier Escandon
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 943b774da2701a4980ad44cc8a7f0f5a9356bbae
Merged at revision: f7f5a4a461f9f7473138f2f5d5cd4af88bda2175
Proposed branch: ~rmescandon/snappy-hwe-snaps/+git/engineering-tests:serial-vault-corrections
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 174 lines (+60/-66)
1 file modified
com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu (+60/-66)
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Approve
System Enablement Bot continuous-integration Approve
Konrad Zapałowicz (community) code Approve
Review via email: mp+330265@code.launchpad.net

Description of the change

- Renamed back serial-vault-server to serial-vault
- Padding adjustment
- Updated some not correct tests content
- Verified manually everything

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

minor thing

review: Needs Fixing (code)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (code)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu b/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu
2index ab1bea1..e01dfe5 100644
3--- a/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu
4+++ b/com.canonical.se:engineering-tests/units/serial-vault/serial-vault.pxu
5@@ -13,14 +13,14 @@ category_id: serial_vault
6 _description: Ensure that the serial-vault interface is auto-connected
7 plugin: manual
8 _steps:
9- 1. List the interfaces
10- .
11- $ snap interfaces | serial-vault-server
12- .
13+ 1. List the interfaces
14+ .
15+ $ snap interfaces serial-vault
16+ .
17 _verification:
18 Verify that you see the following:
19- :network serial-vault-server
20- :network-bind serial-vault-server
21+ :network serial-vault
22+ :network-bind serial-vault
23
24 id: serial_vault/setup/config
25 category_id: serial_vault
26@@ -28,37 +28,35 @@ _description: Ensure that the serial-vault can access database
27 plugin: manual
28 depends: serial_vault/setup/ensure_interface_connection_setup
29 _steps:
30- 1. Create settings.yaml with proper content ot access database
31- .
32- $ cat <<-EOF > settings.yaml
33- title: "Serial Vault"
34- logo: "/static/images/logo-ubuntu-white.svg"
35- mode: signing
36- docRoot: "."
37- driver: "postgres"
38- datasource: "dbname=serialvault sslmode=disable"
39- keystore: "database"
40- keystoreSecret: "secret code to encrypt the auth-key hash"
41- csrfAuthKey: "2E6ZYnVYUfDLRLV/ne8M6v1jyB/376BL9ORnN3Kgb04uSFalr2ygReVsOt0PaGEIRuID10TePBje5xdjIOEjQQ=="
42- urlHost: "serial-vault"
43- urlScheme: http
44- enableUserAuth: True
45- EOF
46- .
47- 2. Apply config
48- .
49- $ cat settings.yaml | sudo serial-vault-server.config
50- .
51- 3. Restart service
52- .
53- $ sudo systemctl restart snap.serial-vault-server.serial-vault.service
54- .
55- 4. Check journal
56- .
57- $ sudo journalctl
58- .
59+ 1. Create settings.yaml with proper content to access database. For example:
60+ .
61+ title: "Serial Vault"
62+ logo: "/static/images/logo-ubuntu-white.svg"
63+ mode: signing
64+ docRoot: "."
65+ driver: "postgres"
66+ datasource: "dbname=serialvault sslmode=disable"
67+ keystore: "database"
68+ keystoreSecret: "secret code to encrypt the auth-key hash"
69+ csrfAuthKey: "2E6ZYnVYUfDLRLV/ne8M6v1jyB/376BL9ORnN3Kgb04uSFalr2ygReVsOt0PaGEIRuID10TePBje5xdjIOEjQQ=="
70+ urlHost: "serial-vault"
71+ urlScheme: http
72+ enableUserAuth: True
73+ .
74+ 2. Apply config
75+ .
76+ $ cat settings.yaml | sudo serial-vault.config
77+ .
78+ 3. Restart service
79+ .
80+ $ sudo systemctl restart snap.serial-vault.service.service
81+ .
82+ 4. Check service status
83+ .
84+ $ sudo systemctl status snap.serial-vault.service.service
85+ .
86 _verification:
87- Verify that you see in journal last page (Alt+G) that database has been created/updated and service is up and running, like this:
88+ Verify that you see that service is active (running) and that the database has been created/updated, like this:
89 Created the 'keypair' table.
90 Created the 'model' table.
91 Created the 'settings' table.
92@@ -79,14 +77,14 @@ _description: Ensure that the serial vault admin commands can be run
93 plugin: manual
94 depends: serial_vault/setup/config
95 _steps:
96- 1. Try to run admin
97- .
98- $ serial-vault-server.admin
99- .
100- 2. Try to run config
101- .
102- $ serial-vault-server.config
103- .
104+ 1. Try to run admin
105+ .
106+ $ serial-vault.admin
107+ .
108+ 2. Try to run config
109+ .
110+ $ serial-vault.config
111+ .
112 _verification:
113 Verify that each step ends showing up the help
114
115@@ -96,14 +94,14 @@ _description: Ensure admin tool can add a superuser
116 plugin: manual
117 depends: serial_vault/operation/ensure-commands-can-be-run
118 _steps:
119- 1. Add a user from console
120- .
121- $ serial-vault-server.admin user add theuser -n TheName -r superuser -e theemail@email.com
122- .
123- 2. List users
124- .
125- $ serial-vault-server.admin user list
126- .
127+ 1. Add a user from console
128+ .
129+ $ serial-vault.admin user add theuser -n TheName -r superuser -e theemail@email.com
130+ .
131+ 2. List users
132+ .
133+ $ serial-vault.admin user list
134+ .
135 _verification:
136 Verify that just created user is in users list with superuser role
137
138@@ -113,16 +111,12 @@ _description: Ensure admin tool can fetch store cached account assertions
139 plugin: manual
140 depends: serial_vault/operation/ensure-commands-can-be-run
141 _steps:
142- 1. Fetch cached accounts from the store
143- .
144- $ serial-vault-server.admin account cache
145- .
146- 2. List users
147- .
148- $ serial-vault-server.admin user list
149- .
150+ 1. Fetch cached accounts from the store
151+ .
152+ $ serial-vault.admin account cache
153+ .
154 _verification:
155- Verify that just created user is in users list with superuser role
156+ Verify that output shows account and keypair processing from Ubuntu store
157
158 id: serial_vault/operation/verify_api_is_reachable
159 category_id: serial_vault
160@@ -130,9 +124,9 @@ _description: Ensure signing service can be reached
161 plugin: manual
162 depends: serial_vault/operation/ensure-commands-can-be-run
163 _steps:
164- 1. Request service version
165- .
166- $ wget http://localhost:8080/v1/version
167- .
168+ 1. Request service version
169+ .
170+ $ wget http://localhost:8080/v1/version
171+ .
172 _verification:
173- Verify that the response content is {"version":"1.6.0"}
174+ Verify that the response content is {"version":"2.0-0"}

Subscribers

People subscribed via source and target branches