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

Fix tests + enable GH test action #15

Merged
merged 20 commits into from
Sep 14, 2023
Merged

Fix tests + enable GH test action #15

merged 20 commits into from
Sep 14, 2023

Conversation

kke
Copy link
Contributor

@kke kke commented Sep 12, 2023

Enables CI test workflow and contains several fixes to the test suite and code that did not pass existing tests.

It seems the test suite last ran on travis five years ago, it's unknown if the suite passed after that.

  • Several assert.NoError / assert.NotNil calls with trailing assertions were converted to require.NoError/NotNil to avoid having to look at a nil panic in case there was an error already.
  • Modified the tests to run against non-prefixed (quay.io/footloose/image => image) images. To run against online images, use full image path explicitly). An exception to this is the test in client_test.go that runs some tests against quay.io/footloose/centos and should probably be moved to e2e, removed, changed, or something.
  • Added a -image flag to the e2e suite for running against a single image instead of all images listed in variables.json. This helps running the suites against a GH workflow matrix and developing images.
  • Fixed the templating thing to replace %image inside the testname.cmd. I don't know how or if the tests worked before that.
  • Fedora test was running against hardcoded centos7
  • Added footloose ssh -v option for verbose ssh output.
  • Machine init failed if /root/.ssh existed on the image (mostly clearlinux affected)
  • There was an automatic ssh retry to combat "connection reset by peer" when connecting too quickly after create. The retry triggered on ssh_exchange_identification. It seems the error almost exclusively is kex_exchange_identification nowadays. Both are accepted now as triggers to retry.

.github/workflows/go.yml Outdated Show resolved Hide resolved
@kke kke marked this pull request as draft September 13, 2023 07:26
@kke kke force-pushed the enable-tests branch 3 times, most recently from 6f5b43c to f49cf94 Compare September 13, 2023 09:18
@kke kke changed the title Run tests on push Fix tests + enable GH test action Sep 13, 2023
@kke kke added bug Something isn't working enhancement New feature or request labels Sep 13, 2023
@kke kke force-pushed the enable-tests branch 3 times, most recently from ca36fd8 to 9457390 Compare September 14, 2023 12:37
@kke kke marked this pull request as ready for review September 14, 2023 12:38
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
not quite sure how it worked before?

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
The retry was only happening on ssh_exchange_identification. It seems
the error is almost exclusively kex_exchange_identification nowadays.

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Editors may add / remove linefeeds at EOF which makes the tests fail

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
@kke
Copy link
Contributor Author

kke commented Sep 14, 2023

There doesn't seem to be any "allow failure" option for workflows, some of the OS tests fail, but it's better to fix them separately as this PR is getting out of hand.

@kke kke requested a review from ncopa September 14, 2023 12:44
@kke
Copy link
Contributor Author

kke commented Sep 14, 2023

See issues #17 and #18 for fixing the remaining issues

@kke kke merged commit 833d758 into main Sep 14, 2023
6 of 10 checks passed
@kke kke deleted the enable-tests branch September 14, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants