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

System tests #157

Merged
merged 6 commits into from
Sep 26, 2023
Merged

System tests #157

merged 6 commits into from
Sep 26, 2023

Conversation

masnax
Copy link
Contributor

@masnax masnax commented Sep 11, 2023

Relies on #156 and #138, as well as canonical/lxd#12238

Adds a series of system tests that test automatic and interactive setup of MicroCloud.

To facilitate this, there is now a TEST_CONSOLE environment variable that will be checked by MicroCloud. If set to 1, MicroCloud will expect a stream of text as input that will be used to simulate terminal input in interactive mode.

@tomponline
Copy link
Member

@masnax was using the expect tool for this a non-started for some reason rather than TEST_CONSOLE?

@masnax
Copy link
Contributor Author

masnax commented Sep 11, 2023

@tomponline expect seems to outright break terminal input once a table appears, or cause EOFs in the go-survey package. I'm by no means an expert using it, but I couldn't get it to work at all.

@tomponline
Copy link
Member

@tomponline expect seems to outright break terminal input once a table appears, or cause EOFs in the go-survey package. I'm by no means an expert using it, but I couldn't get it to work at all.

Fair enough, at least you tried it :)

@masnax masnax force-pushed the system-tests branch 3 times, most recently from 585d7c6 to 4e3319a Compare September 12, 2023 18:32
@masnax masnax marked this pull request as ready for review September 12, 2023 18:40
@tomponline
Copy link
Member

/canonical/self-hosted-runners/run-workflows 23a22ff

@masnax
Copy link
Contributor Author

masnax commented Sep 13, 2023

@tomponline I'm assuming only you can use that command?

@masnax
Copy link
Contributor Author

masnax commented Sep 13, 2023

/canonical/self-hosted-runners/run-workflows bd3a5ed

@masnax
Copy link
Contributor Author

masnax commented Sep 13, 2023

Yeah, no luck :)

@tomponline
Copy link
Member

Ive asked them to relax that check so those with write perm (like you) can trigger it automatically

@masnax
Copy link
Contributor Author

masnax commented Sep 13, 2023

@tomponline thanks, could you run it again? The make command should be fixed now.

@tomponline
Copy link
Member

tomponline commented Sep 13, 2023

/canonical/self-hosted-runners/run-workflows bd3a5ed

@masnax
Copy link
Contributor Author

masnax commented Sep 14, 2023

Setting this to draft until the issues are sorted.

@masnax masnax marked this pull request as draft September 14, 2023 05:47
@masnax masnax force-pushed the system-tests branch 2 times, most recently from 87c2c88 to 98f2540 Compare September 18, 2023 23:44
@tomponline
Copy link
Member

@masnax please can you rebase this so we just see the tests being added and not code changes as well. Ta

Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
@masnax
Copy link
Contributor Author

masnax commented Sep 25, 2023

@tomponline This one should be ready for review as well, thanks.

- name: Install dependencies
run: |
sudo add-apt-repository ppa:dqlite/dev -y
sudo apt-get install -y libdqlite-dev pkg-config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tend to add --no-install-recommends to apt-get install commands to avoid pulling in unnecessary packages.

@tomponline tomponline merged commit b279d83 into canonical:main Sep 26, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants