-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/smoke/harness: migrate from MailHog to Mailpit (#4091)
* add logo back, with makefile comment * Add support for fetching and extracting Mailpit tool * Remove unused static analysis tools from project - Eliminated `ineffassign` and `staticcheck` tool dependencies - Cleaned up related entries in `Makefile`, `go.mod`, and `go.sum` - Streamlined toolchain and dependencies for efficiency * update procfiles * update harness and add tests to validate mail server functionality * update playwright command for email * update playwright test for new email UI * check email links are valid * cleanup code * update deps * add mailpit as smoketest dependency * update Go deps * update mailpit version * switch to runtime.caller * remove stale comment * ensure mailpit for unit test
- Loading branch information
1 parent
29da739
commit 91f646f
Showing
18 changed files
with
477 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package main | ||
|
||
import ( | ||
"archive/tar" | ||
"compress/gzip" | ||
"fmt" | ||
"runtime" | ||
) | ||
|
||
func getMailpit(version, output string) error { | ||
url := fmt.Sprintf("https://github.com/axllent/mailpit/releases/download/v%s/mailpit-%s-%s.tar.gz", | ||
version, runtime.GOOS, runtime.GOARCH, | ||
) | ||
fd, _, err := fetchFile(url) | ||
if err != nil { | ||
return fmt.Errorf("fetch: %w", err) | ||
} | ||
defer fd.Close() | ||
|
||
gzr, err := gzip.NewReader(fd) | ||
if err != nil { | ||
return fmt.Errorf("deflate: %w", err) | ||
} | ||
defer gzr.Close() | ||
|
||
r := tar.NewReader(gzr) | ||
|
||
err = extractFromTar(r, "mailpit", output, true) | ||
if err != nil { | ||
return fmt.Errorf("extract: %w", err) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.