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

Add some negative self-hosted e2e. On error in stop exit with error #683

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

mukundansundar
Copy link
Collaborator

Description

Add some negative self-hosted e2e. On error in stop exit with error

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@codecov
Copy link

codecov bot commented Apr 9, 2021

Codecov Report

Merging #683 (0593b4f) into master (c7b4b54) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #683   +/-   ##
=======================================
  Coverage   19.79%   19.79%           
=======================================
  Files          28       28           
  Lines        1364     1364           
=======================================
  Hits          270      270           
  Misses       1061     1061           
  Partials       33       33           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7b4b54...0593b4f. Read the comment docs.


t.Run("run without install", func(t *testing.T) {
output, err := spawn.Command(daprPath, "run", "test")
require.NoError(t, err, "expected no error status on run without install")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think a separate issue has to be created so that we properly exit with error on error from run.
This needs to be separate task since the scenarios for run command are a bit more complex.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added #684

require.Contains(t, output, "Removing Dapr from your machine...", "expected output to contain message")
path := filepath.Join(homeDir, ".dapr", "bin")
require.Contains(t, output, "WARNING: "+path+" does not exist", "expected output to contain message")
require.Contains(t, output, "WARNING: dapr_placement container does not exist", "expected output to contain message")
Copy link
Member

Choose a reason for hiding this comment

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

These tests will fail when log message changes. Ideally, those could be a shared constant.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean... changing them later is not hard.

require.Contains(t, output, "Removing Dapr from your machine...", "expected output to contain message")
path := filepath.Join(homeDir, ".dapr", "bin")
require.Contains(t, output, "WARNING: "+path+" does not exist", "expected output to contain message")
require.Contains(t, output, "WARNING: dapr_placement container does not exist", "expected output to contain message")
Copy link
Contributor

Choose a reason for hiding this comment

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

I mean... changing them later is not hard.

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.

None yet

3 participants