Skip to content

Commit aeaaeb3

Browse files
authored
[Feature] Add support for automated testing (hestiacp#1990)
* Setup drone file for drone server * Move check_php.sh from ./src/ to ./test/ * Changes have been made to v-add-mail-domain * Update secrets
1 parent 6dbabd5 commit aeaaeb3

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

.drone.ylm

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
kind: pipeline
3+
type: ssh
4+
name: default
5+
6+
concurrency:
7+
limit: 1
8+
9+
server:
10+
host:
11+
from_secret: server_address
12+
user:
13+
from_secret: username
14+
ssh_key:
15+
from_secret: ssh_key
16+
17+
platform:
18+
os: linux
19+
arch: amd64
20+
21+
steps:
22+
- name: submodules
23+
image: alpine/git
24+
commands:
25+
- git submodule update --init --recursive
26+
- name: build-install
27+
commands:
28+
- ./src/hst_autocompile.sh --hestia --install '~localsrc'
29+
- name: bast-test
30+
commands:
31+
- bats ./test/test.bats
32+
- name: php-test
33+
commands:
34+
- ./test/check_php.php
35+
36+
trigger:
37+
event: [ push ]
38+
39+
---
40+
kind: pipeline
41+
type: ssh
42+
name: pull-request
43+
44+
concurrency:
45+
limit: 1
46+
47+
server:
48+
host:
49+
from_secret: server_address
50+
user:
51+
from_secret: username
52+
ssh_key:
53+
from_secret: ssh_key
54+
55+
platform:
56+
os: linux
57+
arch: amd64
58+
59+
steps:
60+
- name: submodules
61+
image: alpine/git
62+
commands:
63+
- git submodule update --init --recursive
64+
- name: build-install
65+
commands:
66+
- ./src/hst_autocompile.sh --hestia --install '~localsrc'
67+
- name: bast-test
68+
commands:
69+
- bats ./test/test.bats
70+
- name: php-test
71+
commands:
72+
- ./test/check_php.php
73+
74+
trigger:
75+
event: [ pull_request ]
File renamed without changes.

test/test.bats

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,13 @@ function validate_database(){
914914
run v-add-mail-domain $user $domain
915915
assert_success
916916
refute_output
917+
}
917918

919+
@test "MAIL: Add mail domain webmail client" {
920+
skip
921+
run v-add-mail-domain-webmail $user $domain "rouncube"
922+
assert_success
923+
refute_output
918924
validate_mail_domain $user $domain
919925

920926
# echo -e "<?php\necho 'Server: ' . \$_SERVER['SERVER_SOFTWARE'];" > /var/lib/roundcube/check_server.php
@@ -950,7 +956,7 @@ function validate_database(){
950956
}
951957

952958
#----------------------------------------------------------#
953-
# Limit possibilities adding different owner domain #
959+
# Limit possibilities adding different owner domain #
954960
#----------------------------------------------------------#
955961

956962
@test "Allow Users: User can't add user.user2.com " {

0 commit comments

Comments
 (0)