...
This commit is contained in:
@@ -38,7 +38,7 @@ pub fn get(args_ ArgsGet) !&${args.classname} {
|
||||
mut args := args_get(args_)
|
||||
mut obj := ${args.classname}{}
|
||||
if !(args.name in ${args.name}_global) {
|
||||
if ! exists(args){
|
||||
if ! exists(args)!{
|
||||
set(obj)!
|
||||
}else{
|
||||
heroscript := context.hero_config_get("${args.name}",args.name)!
|
||||
|
||||
@@ -33,12 +33,9 @@ fn args_get (args_ ArgsGet) ArgsGet {
|
||||
pub fn get(args_ ArgsGet) !&GiteaServer {
|
||||
mut context:=base.context()!
|
||||
mut args := args_get(args_)
|
||||
mut obj := GiteaServer{
|
||||
domain: 'localhost' // Default domain, should be overridden by configuration
|
||||
}
|
||||
mut obj := GiteaServer{}
|
||||
if !(args.name in gitea_global) {
|
||||
exists_res := exists(args) or { false }
|
||||
if !exists_res {
|
||||
if ! exists(args)!{
|
||||
set(obj)!
|
||||
}else{
|
||||
heroscript := context.hero_config_get("gitea",args.name)!
|
||||
|
||||
@@ -19,7 +19,7 @@ pub mut:
|
||||
name string = 'default'
|
||||
path string = '${os.home_dir()}/hero/var/gitea'
|
||||
passwd string
|
||||
domain string @[required]
|
||||
domain string = "git.test.com"
|
||||
jwt_secret string = rand.hex(12)
|
||||
lfs_jwt_secret string
|
||||
internal_token string
|
||||
@@ -43,7 +43,7 @@ fn obj_init(mycfg_ GiteaServer)!GiteaServer{
|
||||
fn configure() ! {
|
||||
mut server := get()!
|
||||
|
||||
if !osal.cmd_exists('gitea')! {
|
||||
if !osal.cmd_exists('gitea') {
|
||||
return error('gitea binary not found in path. Please install gitea first.')
|
||||
}
|
||||
// Generate and set any missing secrets
|
||||
|
||||
@@ -85,28 +85,20 @@ fn process_test_file(path string, base_dir string, test_files_ignore []string, t
|
||||
|
||||
// Check if any ignore pattern matches the path
|
||||
for pattern in test_files_ignore {
|
||||
if pattern.trim_space() != '' && rel_path.contains(pattern) {
|
||||
should_ignore = true
|
||||
break
|
||||
if pattern.trim_space() != '' && rel_path.contains(pattern.trim_space()) {
|
||||
println('Ignoring test: ${rel_path}')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Check if any error pattern matches the path
|
||||
for pattern in test_files_error {
|
||||
if pattern.trim_space() != '' && rel_path.contains(pattern) {
|
||||
is_error = true
|
||||
break
|
||||
if pattern.trim_space() != '' && rel_path.contains(pattern.trim_space()) {
|
||||
println('Ignoring test because is error: ${rel_path}')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if !should_ignore && !is_error {
|
||||
dotest(norm_path, base_dir, mut cache)!
|
||||
} else {
|
||||
println('Ignoring test: ${rel_path}')
|
||||
if !should_ignore {
|
||||
tests_in_error << rel_path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn dotest(path string, base_dir string, mut cache TestCache) ! {
|
||||
@@ -189,6 +181,8 @@ if os.exists("/home/runner"){
|
||||
tests_ignore+="\nosal/tmux\n"
|
||||
}
|
||||
|
||||
println(tests_ignore)
|
||||
|
||||
tests_error := '
|
||||
tmux_window_test.v
|
||||
tmux_test.v
|
||||
|
||||
Reference in New Issue
Block a user