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

E2E specs #698

Merged
merged 11 commits into from
Jan 7, 2022
Merged

E2E specs #698

merged 11 commits into from
Jan 7, 2022

Conversation

lovro-bikic
Copy link
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
@@ -25,3 +25,6 @@ jobs:
bundler-cache: true
- run: bundle exec rubocop
- run: bundle exec rspec
- name: E2E tests
if: ${{ success() && matrix.os != 'macos-10.15' }}
Copy link
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.

@@ -14,9 +14,9 @@ def name
end

# :nocov:
def run
def run(*args)
Copy link
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.

@@ -8,14 +8,14 @@ class Pretty
attr_reader :script

def initialize(script)
@script = script
@script = Shellwords.shellsplit(script)
Copy link
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.

@@ -0,0 +1,27 @@
-----BEGIN OPENSSH PRIVATE KEY-----
Copy link
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.

None yet

2 participants