Skip to content

E2E specs - #698

Merged
lovro-bikic merged 11 commits into
masterfrom
feature/e2e-specs
Jan 7, 2022
Merged

E2E specs#698
lovro-bikic merged 11 commits into
masterfrom
feature/e2e-specs

Conversation

@lovro-bikic

Copy link
Copy Markdown
Member

Adds E2E tests. The idea is to create a docker container into which we can SSH and execute mina commands on it. I added three specs which are ran in this order:

  • call mina deploy before calling mina setup first (it fails)
  • call mina setup (it passes)
  • call mina deploy (it passes since setup has been run)
    I'll add more tests later, this was just initially added to make it work.

@lovro-bikic lovro-bikic added this to the 1.3.0 milestone Aug 20, 2021
@lovro-bikic
lovro-bikic requested a review from d4be4st August 20, 2021 17:11
Comment thread .github/workflows/ci.yml
- run: bundle exec rubocop
- run: bundle exec rspec
- name: E2E tests
if: ${{ success() && matrix.os != 'macos-10.15' }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can't run E2E tests on Mac because it doesn't come with docker, see actions/runner-images#17.

Comment thread lib/mina/application.rb

# :nocov:
def run
def run(*args)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is how run method is defined in Rake::Application.

Comment thread lib/mina/runner/pretty.rb

def initialize(script)
@script = script
@script = Shellwords.shellsplit(script)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was a bug I introduced in #686, E2E tests caught it.

Comment thread spec/e2e/ssh
@@ -0,0 +1,27 @@
-----BEGIN OPENSSH PRIVATE KEY-----

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Usually this isn't safe to keep in repos, but I generated this key just for e2e purposes.

@lovro-bikic
lovro-bikic merged commit 2e9eda9 into master Jan 7, 2022
@lovro-bikic
lovro-bikic deleted the feature/e2e-specs branch January 7, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants