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

[RFE] make CI tests of update-ssh-keys work again #1081

Closed
dongsupark opened this issue Jun 16, 2023 · 2 comments · Fixed by flatcar/update-ssh-keys#9
Closed

[RFE] make CI tests of update-ssh-keys work again #1081

dongsupark opened this issue Jun 16, 2023 · 2 comments · Fixed by flatcar/update-ssh-keys#9
Labels
kind/debt Technological debt.

Comments

@dongsupark
Copy link
Member

Current situation

CI tests of update-ssh-keys do not work at all, due to a missing python2 binary in the default distros in these days. The python tests were written in 2017, and since then they have been very little touched. If we simply replace python2 with python3, then it fails like:

ERROR: test_add_bad (__main__.UpdateSshKeysTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dpark/Dev/kinvolk/update-ssh-keys/tests/test_update_ssh_keys.py", line 66, in setUp
    for name, text in test_keys.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Implementation options

The simplest way to fix this issue to migrate the code to python3. That should be straightforwards.

Another approach would be to simply rewrite every test in Rust, just like the main code of update-ssh-keys. That makes more sense in terms of maintenance, as the repo is currently a strange mix of Rust and Python.

@dongsupark dongsupark added kind/feature A feature request kind/debt Technological debt. and removed kind/feature A feature request labels Jun 16, 2023
@dongsupark
Copy link
Member Author

Recently discussed with @t-lo , and kind of agreed that it would be better to simply rewrite every test in Rust.

@dongsupark
Copy link
Member Author

PR flatcar/update-ssh-keys#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/debt Technological debt.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant