2022-06-01 20:34:36 +02:00
|
|
|
module build
|
|
|
|
|
2022-06-14 22:25:40 +02:00
|
|
|
import models { Target }
|
2022-06-01 20:34:36 +02:00
|
|
|
|
|
|
|
fn test_create_build_script() {
|
2022-06-14 22:25:40 +02:00
|
|
|
target := Target{
|
2022-06-01 20:34:36 +02:00
|
|
|
id: 1
|
|
|
|
url: 'https://examplerepo.com'
|
|
|
|
branch: 'main'
|
|
|
|
repo: 'vieter'
|
|
|
|
}
|
2022-06-14 22:25:40 +02:00
|
|
|
build_script := create_build_script('https://example.com', target, 'x86_64')
|
2022-06-01 20:34:36 +02:00
|
|
|
expected := $embed_file('build_script.sh')
|
|
|
|
|
|
|
|
assert build_script == expected.to_string().trim_space()
|
|
|
|
}
|