Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug Test{AD,IPA}.testQualifiedUsers #19578

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/unit-tests.yml

This file was deleted.

36 changes: 0 additions & 36 deletions packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,6 @@ srpm_build_deps:
# use the nicely formatted release NEWS from our upstream release, instead of git shortlog
copy_upstream_release_description: true
jobs:
- job: tests
identifier: self
trigger: pull_request
targets:
- fedora-38
- fedora-39
- fedora-latest-aarch64
- fedora-development
- centos-stream-8-x86_64
- centos-stream-9-x86_64
- centos-stream-9-aarch64

# current Fedora runs reverse dependency testing against https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/
- job: tests
identifier: revdeps
trigger: pull_request
targets:
- fedora-latest-stable
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/repo/fedora-$releasever/group_cockpit-main-builds-fedora-$releasever.repo
tmt:
context:
revdeps: "yes"

# run build/unit tests on some interesting architectures
- job: copr_build
trigger: pull_request
targets:
# 32 bit
- fedora-development-i386
# big-endian
- fedora-development-s390x

# for cross-project testing
- job: copr_build
trigger: commit
Expand Down
14 changes: 8 additions & 6 deletions test/common/chromium-cdp-driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ function setupFrameTracking(client) {
}

function setupLocalFunctions(client) {
client.reloadPageAndWait = (args) => {
return new Promise((resolve, reject) => {
pageLoadHandler = () => { pageLoadHandler = null; resolve({}) };
client.Page.reload(args);
});
};
client.waitPageLoad = (args) => new Promise((resolve, reject) => {
pageLoadHandler = () => { pageLoadHandler = null; resolve({}) };
});

client.reloadPageAndWait = (args) => new Promise((resolve, reject) => {
pageLoadHandler = () => { pageLoadHandler = null; resolve({}) };
client.Page.reload(args);
});

async function setCSS({ text, frame }) {
await client.DOM.enable();
Expand Down
18 changes: 11 additions & 7 deletions test/common/firefox-cdp-driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ function setupFrameTracking(client) {
});

client.Page.loadEventFired(() => {
if (pageLoadHandler)
if (pageLoadHandler) {
debug("loadEventFired, resolving pageLoadHandler");
pageLoadHandler();
}
});

// track execution contexts so that we can map between context and frame IDs
Expand Down Expand Up @@ -275,12 +277,14 @@ function setupFrameTracking(client) {
}

function setupLocalFunctions(client) {
client.reloadPageAndWait = (args) => {
return new Promise((resolve, reject) => {
pageLoadHandler = () => { pageLoadHandler = null; resolve({}) };
client.Page.reload(args);
});
};
client.waitPageLoad = (args) => new Promise((resolve, reject) => {
pageLoadHandler = () => { pageLoadHandler = null; resolve({}) };
});

client.reloadPageAndWait = (args) => new Promise((resolve, reject) => {
pageLoadHandler = () => { pageLoadHandler = null; resolve({}) };
client.Page.reload(args);
});
}

// helper functions for testlib.py which are too unwieldy to be poked in from Python
Expand Down
1 change: 1 addition & 0 deletions test/common/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def open(self, href: str, cookie: Optional[Dict[str, str]] = None, tls: bool = F

self.switch_to_top()
self.cdp.invoke("Page.navigate", url=href)
self.cdp.invoke("waitPageLoad")

def set_user_agent(self, ua: str):
"""Set the user agent of the browser
Expand Down
4 changes: 2 additions & 2 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PREPARE_OPTS=""
RUN_OPTS=""
ALL_TESTS="$(test/common/run-tests --test-dir test/verify -l)"

RE_NETWORKING='Networking|Bonding|TestBridge|WireGuard|Firewall|Team|IPA|AD'
RE_NETWORKING='IPA|AD'
RE_STORAGE='Storage'
RE_EXPENSIVE='HostSwitching|MultiMachine|Updates|Superuser|Kdump|Pages'

Expand Down Expand Up @@ -71,4 +71,4 @@ if [ -n "$TEST_SCENARIO" ] && [ -z "$RUN_OPTS" ]; then
fi

test/image-prepare --verbose ${PREPARE_OPTS} "$TEST_OS"
test/common/run-tests --jobs ${TEST_JOBS:-1} --test-dir test/verify --track-naughties ${RUN_OPTS}
test/common/run-tests --jobs ${TEST_JOBS:-1} --test-dir test/verify --track-naughties -vt ${RUN_OPTS}
14 changes: 14 additions & 0 deletions test/verify/check-system-realms
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ class CommonTests:

# log in as domain admin and check that we can do privileged operations
b.login_and_go('/system/services#/systemd-tmpfiles-clean.timer', user=f'{self.admin_user}@cockpit.lan', password=self.admin_password)
return

b.wait_in_text("#statuses", "Running")
b.click(".service-top-panel .pf-v5-c-dropdown button")
b.click(".service-top-panel .pf-v5-c-dropdown__menu a:contains('Stop')")
Expand Down Expand Up @@ -286,6 +288,18 @@ class CommonTests:
# sometimes polling for info and joining a domain creates this noise
self.allow_journal_messages('.*org.freedesktop.DBus.Error.Spawn.ChildExited.*')

def testQualifiedUsers2(self):
self.testQualifiedUsers()

def testQualifiedUsers3(self):
self.testQualifiedUsers()

def testQualifiedUsers4(self):
self.testQualifiedUsers()

def testQualifiedUsers5(self):
self.testQualifiedUsers()

def testUnqualifiedUsers(self):
m = self.machine
b = self.browser
Expand Down
Loading