discourse.tests: nodes.discourse.config -> nodes.discourse
This commit is contained in:
@@ -40,7 +40,7 @@ import ./make-test-python.nix (
|
|||||||
|
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
127.0.0.1 ${discourseDomain}
|
127.0.0.1 ${discourseDomain}
|
||||||
${nodes.client.config.networking.primaryIPAddress} ${clientDomain}
|
${nodes.client.networking.primaryIPAddress} ${clientDomain}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
@@ -90,7 +90,7 @@ import ./make-test-python.nix (
|
|||||||
|
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
127.0.0.1 ${clientDomain}
|
127.0.0.1 ${clientDomain}
|
||||||
${nodes.discourse.config.networking.primaryIPAddress} ${discourseDomain}
|
${nodes.discourse.networking.primaryIPAddress} ${discourseDomain}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.dovecot2 = {
|
services.dovecot2 = {
|
||||||
@@ -178,8 +178,8 @@ import ./make-test-python.nix (
|
|||||||
discourse.wait_until_succeeds("curl -sS -f https://${discourseDomain}")
|
discourse.wait_until_succeeds("curl -sS -f https://${discourseDomain}")
|
||||||
discourse.succeed(
|
discourse.succeed(
|
||||||
"curl -sS -f https://${discourseDomain}/session/csrf -c cookie -b cookie -H 'Accept: application/json' | jq -r '\"X-CSRF-Token: \" + .csrf' > csrf_token",
|
"curl -sS -f https://${discourseDomain}/session/csrf -c cookie -b cookie -H 'Accept: application/json' | jq -r '\"X-CSRF-Token: \" + .csrf' > csrf_token",
|
||||||
"curl -sS -f https://${discourseDomain}/session -c cookie -b cookie -H @csrf_token -H 'Accept: application/json' -d 'login=${nodes.discourse.config.services.discourse.admin.username}' -d \"password=${adminPassword}\" | jq -e '.user.username == \"${nodes.discourse.config.services.discourse.admin.username}\"'",
|
"curl -sS -f https://${discourseDomain}/session -c cookie -b cookie -H @csrf_token -H 'Accept: application/json' -d 'login=${nodes.discourse.services.discourse.admin.username}' -d \"password=${adminPassword}\" | jq -e '.user.username == \"${nodes.discourse.services.discourse.admin.username}\"'",
|
||||||
"curl -sS -f https://${discourseDomain}/login -v -H 'Accept: application/json' -c cookie -b cookie 2>&1 | grep ${nodes.discourse.config.services.discourse.admin.username}",
|
"curl -sS -f https://${discourseDomain}/login -v -H 'Accept: application/json' -c cookie -b cookie 2>&1 | grep ${nodes.discourse.services.discourse.admin.username}",
|
||||||
)
|
)
|
||||||
|
|
||||||
client.wait_for_unit("postfix.service")
|
client.wait_for_unit("postfix.service")
|
||||||
|
|||||||
Reference in New Issue
Block a user