crosscode: install and add Accounts; agent: Accounts installs and add-product
crosscode install takes --products accounts (one product per install); crosscode add <church> <product> installs a product next to a church's others, as its app user, undoing only its own folder, database, PM2 and site if a step fails. install_events/install_accounts share the checks, ports and nginx site. Agent 1.1.0: install jobs for Accounts, and add-product jobs (behind frp, with the Hub's ports and release). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -85,3 +85,35 @@ setup() {
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"expected events@x.y.z"* ]]
|
||||
}
|
||||
|
||||
@test "install takes accounts too, one product at a time" {
|
||||
run bash "$CC" install hope --products events,accounts --domain hope.co.za --no-ssl
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"One product per install"* ]]
|
||||
|
||||
run bash "$CC" install hope --products accounts --domain hope.co.za --version events@2.4.0 --no-ssl
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"expected accounts@x.y.z"* ]]
|
||||
|
||||
run bash "$CC" install hope --products accounts --domain hope.co.za --frp
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"--frp needs --api-port and --web-port"* ]]
|
||||
}
|
||||
|
||||
@test "add checks its arguments before anything needs root" {
|
||||
run bash "$CC" add hope
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"Name the church and the product"* ]]
|
||||
|
||||
run bash "$CC" add hope website --no-ssl
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"can only add events and accounts"* ]]
|
||||
|
||||
run bash "$CC" add hope accounts
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" == *"--email is required"* ]]
|
||||
|
||||
run bash "$CC" help add
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"crosscode add <church> <product>"* ]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user