Skip to content

Revert scheduled tests with 2/candidate#1318

Merged
roosterfish merged 2 commits into
canonical:mainfrom
roosterfish:revert_v2_tests
Apr 9, 2026
Merged

Revert scheduled tests with 2/candidate#1318
roosterfish merged 2 commits into
canonical:mainfrom
roosterfish:revert_v2_tests

Conversation

@roosterfish
Copy link
Copy Markdown
Contributor

@roosterfish roosterfish commented Apr 8, 2026

This PR reverts #1315.

By simply skipping the binary injection for 2/candidate, we don't anymore use the special test binary required for the test suite that runs in non-interactive mode. This will cause the tests to error as all microcloud * commands will launch in interactive mode.

As an example see https://github.com/canonical/microcloud/actions/runs/24138613221/job/70433996098.

…dge and 2 candidate"

This reverts commit 10ceef5.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…en using candidate channel"

This reverts commit 3824a54.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@roosterfish roosterfish changed the title Revert tests with 2/candidate Revert scheduled tests with 2/candidate Apr 8, 2026
Copy link
Copy Markdown
Contributor

@tugbataluy tugbataluy left a comment

Choose a reason for hiding this comment

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

LGTM. I missed the non-interactive binary dependency when approving #1315, apologies.

@roosterfish
Copy link
Copy Markdown
Contributor Author

LGTM. I missed the non-interactive binary dependency when approving #1315, apologies.

I should have spotted it beforehand.

Before we can enable this we need to make sure we can test with arbitrary snap versions without injecting a custom test binary that accommodates the test suite.
We could enable the testing mode inside the shipped snaps so when you use TEST_CONSOLE=1 it switches into this mode.

IIRC back then this wasn't added to the snap's binary to ensure the trust establishment cannot be shortcut as setting TEST_CONSOLE=1 will also assume a passphrase of a a a a which makes testing easier as we don't always have to grab the random passphrase from stdout.

# Don't inject debug binaries if not using the edge channel of MicroCloud.
# This allows running the test suite with candidate channels without injecting another version.
if [ -n "${MICROCLOUD_DEBUG_PATH}" ] && [ -n "${MICROCLOUDD_DEBUG_PATH}" ] && [[ "${MICROCLOUD_SNAP_CHANNEL}" == */edge ]]; then
if [ -n "${MICROCLOUD_DEBUG_PATH}" ] && [ -n "${MICROCLOUDD_DEBUG_PATH}" ]; then
Copy link
Copy Markdown
Member

@simondeziel simondeziel Apr 8, 2026

Choose a reason for hiding this comment

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

Would it be possible to MICROCLOUD_DEBUG_PATH=/snap/microcloud/current/...?

This would sideload the same binary as shipped by the snap.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great idea, but the binary in the snap doesn't contain the bits that allow it being put into testing mode (not built with -tags=test).

@simondeziel
Copy link
Copy Markdown
Member

simondeziel commented Apr 8, 2026

We could enable the testing mode inside the shipped snaps so when you use TEST_CONSOLE=1 it switches into this mode.

IIRC back then this wasn't added to the snap's binary to ensure the trust establishment cannot be shortcut as setting TEST_CONSOLE=1 will also assume a passphrase of a a a a which makes testing easier as we don't always have to grab the random passphrase from stdout.

If grabbing the random passphrase from stdout is feasible, that sounds like the best way forward to me.

@roosterfish
Copy link
Copy Markdown
Contributor Author

If grabbing the random passphrase from stdout is feasible, that sounds like the best way forward to me.

Actually this is how we did it from the start when adding trust establishment. But later we removed those bits from the binary which is shipped with the snap.
I have added #1320 so we can address this properly.

@roosterfish roosterfish merged commit ae29c1c into canonical:main Apr 9, 2026
29 of 30 checks passed
@roosterfish roosterfish deleted the revert_v2_tests branch April 9, 2026 06:54
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.

3 participants