File tree Expand file tree Collapse file tree 3 files changed +58
-6
lines changed
data/containers/helm/kiosk Expand file tree Collapse file tree 3 files changed +58
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : v1
3
+ kind : ConfigMap
4
+ metadata :
5
+ name : audio-html-config
6
+ data :
7
+ audio.html : |
8
+ <!DOCTYPE html>
9
+ <html>
10
+ <head>
11
+ <title>Sample audio file</title>
12
+ </head>
13
+ <body>
14
+ <audio loop controls> <!-- autoplay is blocked in modern browsers -->
15
+ <source src="https://github.com/os-autoinst/os-autoinst-distri-opensuse/raw/refs/heads/master/data/bar.wav" type="audio/wav">
16
+ Your browser does not support the audio tag.
17
+ </audio>
18
+ </body>
19
+ </html>
20
+ ---
21
+ apiVersion : v1
22
+ kind : Pod
23
+ metadata :
24
+ name : nginx-test
25
+ labels :
26
+ app : nginx-test
27
+ spec :
28
+ containers :
29
+ - name : nginx
30
+ image : registry.suse.com/suse/nginx
31
+ volumeMounts :
32
+ - name : html-volume
33
+ mountPath : /srv/www/htdocs/audio.html
34
+ subPath : audio.html
35
+ volumes :
36
+ - name : html-volume
37
+ configMap :
38
+ name : audio-html-config
39
+ ---
40
+ apiVersion : v1
41
+ kind : Service
42
+ metadata :
43
+ name : nginx-test
44
+ spec :
45
+ type : ClusterIP
46
+ clusterIP : 10.43.0.69
47
+ ports :
48
+ - port : 80
49
+ targetPort : 80
50
+ selector :
51
+ app : nginx-test
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ pulseaudio:
14
14
tag : " 17.0"
15
15
workload :
16
16
# Page to load if using firefox as the workload
17
- url : " https ://freesound.org/people/kevp888/sounds/796468/ "
17
+ url : " http ://10.43.0.69/audio.html "
18
18
# Additional environment variables to passthrough into the workload
19
19
env : []
20
20
# These can be used to provide a custom workload
Original file line number Diff line number Diff line change @@ -21,12 +21,15 @@ sub run {
21
21
22
22
select_serial_terminal;
23
23
my $helm_chart = get_required_var(" HELM_CHART" );
24
- my $helm_values = autoinst_url(" /data/containers/kiosk_helm_values .yaml" );
24
+ my $helm_values = autoinst_url(" /data/containers/helm/kiosk/values .yaml" );
25
25
26
26
# Install helm
27
- set_var(' HELM_INSTALL_UPSTREAM' , 1);
28
27
install_helm();
29
28
29
+ # Run an nginx container with a test page and wait for it
30
+ assert_script_run(" kubectl apply -f " . autoinst_url(" /data/containers/helm/kiosk/nginx.yaml" ));
31
+ assert_script_run(" kubectl wait --for=condition=Ready pod/nginx-test --timeout=60s" );
32
+
30
33
# login to graphical tty before starting
31
34
select_console ' root-console' ;
32
35
@@ -38,12 +41,10 @@ sub run {
38
41
select_console ' root-console' ;
39
42
assert_screen(" firefox_kiosk" , 300);
40
43
assert_and_click(" firefox_play_audio" );
41
- # Enable loop play to ensure the "pactl list sink-inputs" can get a verbose list for each active audio stream
42
- assert_and_click(" firefox_loop_play" );
43
44
44
45
select_serial_terminal;
45
46
46
- my $pod_name = script_output(" kubectl get pods -o name | cut -d '/' -f 2" );
47
+ my $pod_name = script_output(" kubectl get pods -o name | grep kiosk | cut -d '/' -f 2" );
47
48
48
49
# check if pulseaudio is running
49
50
validate_script_output(" kubectl exec $pod_name -c pulseaudio -- sh -c 'ps aux'" , qr / ^pulse.*pulseaudio$ / m );
You can’t perform that action at this time.
0 commit comments