forked from keploy/keploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for replacing baseUrl of test case url (keploy#1916)
* feat: add support for replacing request originof test case url Signed-off-by: gouravkrosx <[email protected]> * fix: condition of replacing base-url Signed-off-by: gouravkrosx <[email protected]> * chore: refactor code Signed-off-by: gouravkrosx <[email protected]> * fix: execution blocked due to no context cancellation Signed-off-by: gouravkrosx <[email protected]> * fix: lint Signed-off-by: gouravkrosx <[email protected]> * chore: addressed PR comments Signed-off-by: gouravkrosx <[email protected]> --------- Signed-off-by: gouravkrosx <[email protected]> Former-commit-id: 6c052f7
- Loading branch information
1 parent
7e58e2d
commit 8ef7e7f
Showing
13 changed files
with
288 additions
and
291 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
package provider | ||
|
||
import ( | ||
"errors" | ||
|
||
"go.keploy.io/server/v2/utils" | ||
) | ||
|
||
func (c *CmdConfigurator) noCommandError() error { | ||
utils.LogError(c.logger, nil, "missing required -c flag or appCmd in config file") | ||
if c.cfg.InDocker { | ||
c.logger.Info(`Example usage: keploy test -c "docker run -p 8080:8080 --network myNetworkName myApplicationImageName" --delay 6`) | ||
} else { | ||
c.logger.Info(LogExample(RootExamples)) | ||
} | ||
return errors.New("missing required -c flag or appCmd in config file") | ||
} | ||
|
||
// alreadyRunning checks that during test mode, if user provides the basePath, then it implies that the application is already running somewhere. | ||
func alreadyRunning(cmd, basePath string) bool { | ||
return (cmd == "test" && basePath != "") | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.