Skip to content

Commit efe66c0

Browse files
committed
test if services are available
Signed-off-by: Swikriti Tripathi <[email protected]>
1 parent fb1c427 commit efe66c0

File tree

3 files changed

+41
-43
lines changed

3 files changed

+41
-43
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,16 @@ jobs:
105105
sudo update-ca-certificates
106106
ls ./apps/integration_openproject/ci/data/ssl
107107
cd apps/integration_openproject/ci
108-
docker compose up nextcloud proxy openproject -d
108+
docker compose up nextcloud proxy openproject start_dependencies -d
109109
110-
- name: wait on OpenProject
111-
uses: iFaxity/wait-on-action@v1
112-
with:
113-
resource: http-get://host.docker.internal:3000/api/v3/
114-
timeout: 240000
110+
# - name: wait on OpenProject
111+
# uses: iFaxity/wait-on-action@v1
112+
# with:
113+
# resource: http-get://host.docker.internal:3000/api/v3/
114+
# timeout: 240000
115115

116116
- name: wait on Nextcloud
117-
run: until curl -s -f http://nextcloud/status.php | grep '"installed":true'; do echo .; sleep 10; done
117+
run: until curl -s -f http://nextcloud.local/status.php | grep '"installed":true'; do echo .; sleep 10; done
118118

119119
- name: try Nextcloud 1
120120
run: curl http://nextcloud.local/status.php -v

ci/docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ services:
9696
- ./data/ssl/:/usr/local/share/ca-certificates
9797
# command: ["sh", "-c", "sudo update-ca-certificates && exec ./docker/prod/supervisord"]
9898

99-
# start_dependencies:
100-
# image: dadarek/wait-for-dependencies
101-
# depends_on:
102-
# - proxy
103-
# - openproject
104-
# command: proxy:443 proxy:80 openproject:3000
99+
start_dependencies:
100+
image: dadarek/wait-for-dependencies
101+
depends_on:
102+
- proxy
103+
- openproject
104+
command: proxy:443 proxy:80 openproject:80
105105

106106
volumes:
107107
data:
Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
1-
const { Before, BeforeAll, AfterAll, After, setDefaultTimeout } = require("@cucumber/cucumber")
2-
const { chromium } = require("playwright")
3-
const {config} = require("./config")
1+
const { Before, BeforeAll, AfterAll, After, setDefaultTimeout } = require('@cucumber/cucumber')
2+
const { chromium } = require('playwright')
3+
const { config } = require('./config')
44
const apiHelper = require('./helpers/apiHelper')
5-
const { OpenprojectAdminPage } = require("./pageObjects/OpenprojectAdminPage")
6-
const opAdminPageObject = new OpenprojectAdminPage()
5+
const { OpenprojectAdminPage } = require('./pageObjects/OpenprojectAdminPage')
76

87
setDefaultTimeout(120000)
98

10-
BeforeAll(async function () {
11-
await apiHelper.createAdmin()
9+
BeforeAll(async function() {
10+
// await apiHelper.createAdmin()
1211
global.browserNC = await chromium.launch({
13-
headless: true,
14-
});
12+
headless: false,
13+
})
1514
global.browserOP = await chromium.launch({
16-
headless: true,
17-
});
18-
});
15+
headless: false,
16+
})
17+
})
1918

20-
AfterAll(async function () {
19+
AfterAll(async function() {
2120
await global.browserNC.close()
2221
await global.browserOP.close()
23-
});
22+
})
2423

25-
Before(async function () {
24+
Before(async function() {
2625
global.contextNC = await global.browserNC.newContext()
27-
await contextNC.grantPermissions(['clipboard-read','clipboard-write']);
28-
await contextNC.tracing.start({ screenshots: true, snapshots: true });
26+
await contextNC.grantPermissions(['clipboard-read', 'clipboard-write'])
27+
await contextNC.tracing.start({ screenshots: true, snapshots: true })
2928
global.pageNC = await global.contextNC.newPage()
3029
global.contextOP = await global.browserOP.newContext()
31-
await contextOP.grantPermissions(['clipboard-read','clipboard-write']);
32-
await contextOP.tracing.start({ screenshots: true, snapshots: true });
30+
await contextOP.grantPermissions(['clipboard-read', 'clipboard-write'])
31+
await contextOP.tracing.start({ screenshots: true, snapshots: true })
3332
global.pageOP = await global.contextOP.newPage()
34-
});
33+
})
3534

36-
After(async function () {
35+
After(async function() {
3736
await apiHelper.resetNextcloudOauthSettings()
38-
// await opAdminPageObject.deleteFileStorage()
39-
await global.pageNC.close();
40-
await contextNC.tracing.stop({ path: 'tests/e2e/report/traceNC.zip' });
41-
await global.contextNC.close();
42-
await global.pageOP.close();
43-
await contextOP.tracing.stop({ path: 'tests/e2e/report/traceOP.zip' });
44-
await global.contextOP.close();
45-
46-
});
37+
await apiHelper.deleteStorage()
38+
await global.pageNC.close()
39+
await contextNC.tracing.stop({ path: 'tests/e2e/report/traceNC.zip' })
40+
await global.contextNC.close()
41+
await global.pageOP.close()
42+
await contextOP.tracing.stop({ path: 'tests/e2e/report/traceOP.zip' })
43+
await global.contextOP.close()
44+
})

0 commit comments

Comments
 (0)